summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/shm.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-12-18 20:32:04 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-12-18 20:32:04 +0000
commitf16706de978322fb69a39bae0dd817fb2fdaeaf2 (patch)
tree057ab687428b320ffe92db406a7767039756e398 /winsup/cygwin/shm.cc
parent333a47d316455824fb63bf35938a1c8ea870b84b (diff)
downloadcygnal-f16706de978322fb69a39bae0dd817fb2fdaeaf2.tar.gz
cygnal-f16706de978322fb69a39bae0dd817fb2fdaeaf2.tar.bz2
cygnal-f16706de978322fb69a39bae0dd817fb2fdaeaf2.zip
Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess
according to context. Throughout, replace hMainThread with GetCurrentThread/NtCurrentThread according to context. * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to hMainProc. Drop duplication of GetCurrentThread to hMainThread. * dtable.cc (dtable::stdio_init): Remove useless comment. * globals.cc (hMainProc): Remove. (hMainThread): Remove. * ntdll.h (NtCurrentProcess): Define. (NtCurrentThread: Define.
Diffstat (limited to 'winsup/cygwin/shm.cc')
-rw-r--r--winsup/cygwin/shm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/shm.cc b/winsup/cygwin/shm.cc
index 9b4cba442..8b41a38df 100644
--- a/winsup/cygwin/shm.cc
+++ b/winsup/cygwin/shm.cc
@@ -136,7 +136,7 @@ fixup_shms_after_fork ()
NTSTATUS status;
vm_object_t ptr = sph_entry->ptr;
ULONG viewsize = sph_entry->parent->size;
- status = NtMapViewOfSection (sph_entry->parent->hdl, GetCurrentProcess (),
+ status = NtMapViewOfSection (sph_entry->parent->hdl, NtCurrentProcess (),
&ptr, 0, sph_entry->parent->size, NULL,
&viewsize, ViewShare, 0, sph_entry->access);
if (!NT_SUCCESS (status) || ptr != sph_entry->ptr)
@@ -221,7 +221,7 @@ shmat (int shmid, const void *shmaddr, int shmflg)
vm_object_t ptr = NULL;
ULONG viewsize = ssh_entry->size;
ULONG access = (shmflg & SHM_RDONLY) ? PAGE_READONLY : PAGE_READWRITE;
- status = NtMapViewOfSection (ssh_entry->hdl, GetCurrentProcess (), &ptr, 0,
+ status = NtMapViewOfSection (ssh_entry->hdl, NtCurrentProcess (), &ptr, 0,
ssh_entry->size, NULL, &viewsize, ViewShare,
MEM_TOP_DOWN, access);
if (!NT_SUCCESS (status))