diff options
author | Thomas Pfaff <tpfaff@gmx.net> | 2003-05-15 23:42:51 +0400 |
---|---|---|
committer | Thomas Pfaff <tpfaff@gmx.net> | 2003-05-15 23:42:51 +0400 |
commit | c8fa3426af407099b0b55b6113f152975794d5fa (patch) | |
tree | f3474c259ee305dcd3a5eff63484e652058a8777 /winsup/cygwin/thread.cc | |
parent | ac5e8cb29c19dcd286d78ad5cfa84dd6bcbf63d1 (diff) |
* thread.h (pthread::init_mainthread): Remove function parameter.
(MTinterface::Init): Ditto.
* thread.cc (MTinterface::Init): Remove function parameter.
Always initialize reent_key.
(pthread::init_mainthread): Remove function parameter.
(MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
* dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
pthread::init_mainthread.
Call pthread::init_mainthread only when not forked.
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r-- | winsup/cygwin/thread.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index de5392f84..0321ea47b 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -188,14 +188,12 @@ ResourceLocks::Delete () } void -MTinterface::Init (int forked) +MTinterface::Init () { reents._clib = _impure_ptr; reents._winsup = &winsup_reent; winsup_reent._process_logmask = LOG_UPTO (LOG_DEBUG); - - if (!forked) - reent_key.set (&reents); + reent_key.set (&reents); pthread_mutex::init_mutex (); pthread_cond::init_mutex (); @@ -215,7 +213,7 @@ MTinterface::fixup_after_fork (void) pthread_key::fixup_after_fork (); threadcount = 1; - pthread::init_mainthread (true); + pthread::init_mainthread (); pthread_mutex::fixup_after_fork (); pthread_cond::fixup_after_fork (); @@ -227,11 +225,8 @@ MTinterface::fixup_after_fork (void) /* static methods */ void -pthread::init_mainthread (bool do_init) +pthread::init_mainthread () { - if (!do_init) - return; - pthread *thread = get_tls_self_pointer (); if (!thread) { |