* 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:
@@ -4,7 +4,8 @@
|
||||
which is intended to operate similarly to a mutex but attempts to
|
||||
avoid making expensive calls to the kernel.
|
||||
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 Red Hat, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012
|
||||
Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -109,10 +110,8 @@ muto::acquired ()
|
||||
|
||||
/* Return the muto lock. Needs to be called once per every acquire. */
|
||||
int
|
||||
muto::release ()
|
||||
muto::release (_cygtls *this_tls)
|
||||
{
|
||||
void *this_tls = &_my_tls;
|
||||
|
||||
if (tls != this_tls || !visits)
|
||||
{
|
||||
SetLastError (ERROR_NOT_OWNER); /* Didn't have the lock. */
|
||||
|
Reference in New Issue
Block a user