diff options
author | Robert Collins <rbtcollins@hotmail.com> | 2001-04-22 23:59:15 +0000 |
---|---|---|
committer | Robert Collins <rbtcollins@hotmail.com> | 2001-04-22 23:59:15 +0000 |
commit | 9672024b826f38868879a1b5fb60891e5830eff6 (patch) | |
tree | 3c76c98844c6cf65e36e1d8725a57472acbee5c0 | |
parent | cb4cc28370e4d7d57307b8b917ac9557ab488669 (diff) | |
download | cygnal-9672024b826f38868879a1b5fb60891e5830eff6.tar.gz cygnal-9672024b826f38868879a1b5fb60891e5830eff6.tar.bz2 cygnal-9672024b826f38868879a1b5fb60891e5830eff6.zip |
Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (MTinterface::Init): Always initialise per process variables.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f8099d8a3..01616f071 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com> + + * thread.cc (MTinterface::Init): Always initialise per process variables. + Sun Apr 22 19:18:18 2001 Christopher Faylor <cgf@cygnus.com> * features.h: Reinstate as wrapper for sys/features.h. diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index c30f9b2de..0a438ce80 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -294,16 +294,16 @@ MTinterface::Init (int forked) concurrency = 0; threadcount = 1; /* 1 current thread when Init occurs.*/ + mainthread.win32_obj_id = myself->hProcess; + mainthread.setThreadIdtoCurrent (); + /* store the main thread's self pointer */ + TlsSetValue (thread_self_dwTlsIndex, &mainthread); + if (forked) return; /* possible the atfork lists should be inited here as well */ - mainthread.win32_obj_id = myself->hProcess; - mainthread.setThreadIdtoCurrent (); - /* store the main thread's self pointer */ - TlsSetValue (thread_self_dwTlsIndex, &mainthread); - for (int i =0;i<256;i++)pshared_mutexs[i]=NULL; #if 0 |