summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tape.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/fhandler_tape.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/fhandler_tape.cc')
-rw-r--r--winsup/cygwin/fhandler_tape.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index d90810f89..22869983e 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -1428,8 +1428,9 @@ fhandler_dev_tape::dup (fhandler_base *child)
{
lock (-1);
fhandler_dev_tape *fh = (fhandler_dev_tape *) child;
- if (!DuplicateHandle (hMainProc, mt_mtx, hMainProc, &fh->mt_mtx, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
+ if (!DuplicateHandle (GetCurrentProcess (), mt_mtx,
+ GetCurrentProcess (), &fh->mt_mtx,
+ 0, TRUE, DUPLICATE_SAME_ACCESS))
{
debug_printf ("dup(%s) failed, mutex handle %x, %E",
get_name (), mt_mtx);
@@ -1438,8 +1439,9 @@ fhandler_dev_tape::dup (fhandler_base *child)
}
fh->mt_evt = NULL;
if (mt_evt &&
- !DuplicateHandle (hMainProc, mt_evt, hMainProc, &fh->mt_evt, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
+ !DuplicateHandle (GetCurrentProcess (), mt_evt,
+ GetCurrentProcess (), &fh->mt_evt,
+ 0, TRUE, DUPLICATE_SAME_ACCESS))
{
debug_printf ("dup(%s) failed, event handle %x, %E",
get_name (), mt_evt);