diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-10-09 10:54:13 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-10-09 10:54:13 +0000 |
commit | 9c154abedb4cbf713808e2fbe625f6d80939dcc3 (patch) | |
tree | 7c35bfc394febeaa1c5e45b74ba941a290799662 /winsup/cygwin/ntdll.h | |
parent | d8c5f616ef4f210853d558d14bde281aa43b150a (diff) | |
download | cygnal-9c154abedb4cbf713808e2fbe625f6d80939dcc3.tar.gz cygnal-9c154abedb4cbf713808e2fbe625f6d80939dcc3.tar.bz2 cygnal-9c154abedb4cbf713808e2fbe625f6d80939dcc3.zip |
* cygheap.h (cwdstuff::override_win32_cwd): Declare.
* ntdll.h (struct _PEB): Add members accessed by the fast cwd method
starting with Vista.
(struct _KUSER_SHARED_DATA): Define with only the DismountCount.
(RtlAllocateHeap): Declare.
(RtlEnterCriticalSection): Declare.
(RtlFreeHeap): Declare.
(RtlLeaveCriticalSection): Declare.
* path.cc (get_user_proc_parms): Remove.
(struct _FAST_CWD): New structure.
(fast_cwd_ptr): Define.
(SharedUserData): Define.
(peek32): Define.
(find_fast_cwd_pointers): New function to find the global pointer
to the current FAST_CWD structure.
(copy_cwd_str): New helper function.
(cwdstuff::override_win32_cwd): New method to set the Win32 CWD.
(cwdstuff::init): Just call override_win32_cwd from here when
started from native Win32 parent.
(cwdstuff::set): Access Win32 CWD via PEB reference instead of using
get_user_proc_parms function. Memorize old DismountCount before
opening directory handle. Call override_win32_cwd to set up Win32 CWD.
Be more verbose in comments.
* wincap.h (wincaps::has_fast_cwd): New element.
* wincap.cc: Implement has_fast_cwd element throughout.
Diffstat (limited to 'winsup/cygwin/ntdll.h')
-rw-r--r-- | winsup/cygwin/ntdll.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 41c84a2ce..54c56f027 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -584,7 +584,10 @@ typedef struct _PEB BYTE Reserved2[9]; PVOID LoaderData; PRTL_USER_PROCESS_PARAMETERS ProcessParameters; - BYTE Reserved3[448]; + BYTE Reserved3[4]; + PVOID ProcessHeap; + PRTL_CRITICAL_SECTION FastPebLock; + BYTE Reserved4[436]; ULONG SessionId; } PEB, *PPEB; @@ -596,6 +599,13 @@ typedef struct _TEB /* A lot more follows... */ } TEB, *PTEB; +typedef struct _KUSER_SHARED_DATA +{ + BYTE Reserved1[0x2dc]; + ULONG DismountCount; + /* A lot more follows... */ +} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA; + typedef struct _PROCESS_BASIC_INFORMATION { NTSTATUS ExitStatus; @@ -979,10 +989,11 @@ extern "C" NTSTATUS NTAPI NtWriteFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG); + VOID NTAPI RtlAcquirePebLock (); + PVOID NTAPI RtlAllocateHeap (PVOID, ULONG, SIZE_T); NTSTATUS NTAPI RtlAppendUnicodeToString (PUNICODE_STRING, PCWSTR); NTSTATUS NTAPI RtlAppendUnicodeStringToString (PUNICODE_STRING, PUNICODE_STRING); - VOID NTAPI RtlAcquirePebLock (); NTSTATUS NTAPI RtlAnsiStringToUnicodeString (PUNICODE_STRING, PANSI_STRING, BOOLEAN); LONG NTAPI RtlCompareUnicodeString (PUNICODE_STRING, PUNICODE_STRING, @@ -992,9 +1003,11 @@ extern "C" BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz (PUNICODE_STRING, PCSTR); NTSTATUS NTAPI RtlDowncaseUnicodeString (PUNICODE_STRING, PUNICODE_STRING, BOOLEAN); + NTSTATUS NTAPI RtlEnterCriticalSection (PRTL_CRITICAL_SECTION); BOOLEAN NTAPI RtlEqualUnicodeString (PUNICODE_STRING, PUNICODE_STRING, BOOLEAN); VOID NTAPI RtlFreeAnsiString (PANSI_STRING); + BOOLEAN NTAPI RtlFreeHeap (PVOID, ULONG, PVOID); VOID NTAPI RtlFreeOemString (POEM_STRING); VOID NTAPI RtlFreeUnicodeString (PUNICODE_STRING); HANDLE NTAPI RtlGetCurrentTransaction (); @@ -1002,6 +1015,7 @@ extern "C" VOID NTAPI RtlInitUnicodeString (PUNICODE_STRING, PCWSTR); NTSTATUS NTAPI RtlIntegerToUnicodeString (ULONG, ULONG, PUNICODE_STRING); ULONG NTAPI RtlIsDosDeviceName_U (PCWSTR); + NTSTATUS NTAPI RtlLeaveCriticalSection (PRTL_CRITICAL_SECTION); ULONG NTAPI RtlNtStatusToDosError (NTSTATUS); NTSTATUS NTAPI RtlOemStringToUnicodeString (PUNICODE_STRING, POEM_STRING, BOOLEAN); |