* DevNotes: Add entry cgf-000017.
* _cygtls.cc (_cygtls::call2): Use new exit_thread function in place of ExitThread. * miscfuncs.cc (thread_wrapper): Ditto. * thread.cc (pthread::exit): Ditto. (pthread_mutex::unlock): Set tid to NULL rather than 0. (pthread_spinlock::unlock): Ditto. * pinfo.cc (commune_process): Actually call lock_process constructor. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls.
This commit is contained in:
@@ -532,7 +532,7 @@ pthread::exit (void *value_ptr)
|
||||
_main_tls = dummy;
|
||||
_main_tls->initialized = false;
|
||||
}
|
||||
ExitThread (0);
|
||||
exit_thread (0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1778,7 +1778,7 @@ pthread_mutex::unlock ()
|
||||
{
|
||||
owner = (pthread_t) _unlocked_mutex;
|
||||
#ifdef DEBUGGING
|
||||
tid = 0;
|
||||
tid = NULL;
|
||||
#endif
|
||||
if (InterlockedDecrement ((long *) &lock_counter))
|
||||
::SetEvent (win32_obj_id); // Another thread is waiting
|
||||
@@ -1905,7 +1905,7 @@ pthread_spinlock::unlock ()
|
||||
{
|
||||
owner = (pthread_t) _unlocked_mutex;
|
||||
#ifdef DEBUGGING
|
||||
tid = 0;
|
||||
tid = NULL;
|
||||
#endif
|
||||
InterlockedExchange ((long *) &lock_counter, 0);
|
||||
::SetEvent (win32_obj_id);
|
||||
|
Reference in New Issue
Block a user