* cygthread.h (cygthread::avail): Make LONG for easier use with Interlocked*
functions. * cygthread.cc (cygthread::init): Eliminate unneeded muto. (cygthread::operator new): Don't lock. Instead change use of avail variable into tri-state: available (1), not available (-1), uninitialized (0). (cygthread::terminate_thread): Set avail to uninitialized. (cygthread::detach): Eliminate local 'avail'. Always set avail to 1 unless signalled. * cygthread.cc (cygthread::operator new): Be more defensive when messing with
This commit is contained in:
@ -8,7 +8,7 @@ details. */
|
||||
|
||||
class cygthread
|
||||
{
|
||||
DWORD avail;
|
||||
LONG avail; /* 1: available, 0: ininitialized, -1: not available */
|
||||
DWORD id;
|
||||
HANDLE h;
|
||||
HANDLE ev;
|
||||
|
Reference in New Issue
Block a user