* 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:
Christopher Faylor
2003-04-04 18:52:11 +00:00
parent 5557a0dace
commit 9dbe3289ee
3 changed files with 32 additions and 28 deletions

View File

@ -8,7 +8,7 @@ details. */
class cygthread
{
DWORD avail;
LONG avail; /* 1: available, 0: ininitialized, -1: not available */
DWORD id;
HANDLE h;
HANDLE ev;