* cygthread.h (cygthread::terminate): Declare new function.

(cygthread::initialized): Change to 'int'.
* cygthread.cc (cygthread::stub): Exit thread if initialized < 0.
(cygthread::new): Ditto.
(cygthread::runner): Ditto.  Set initialized using xor to preserve sign.
(cygthread::terminate): New function.
* dcrt0.cc (do_exit): Call cygthread::terminate.
This commit is contained in:
Christopher Faylor
2002-09-29 02:19:35 +00:00
parent fc5dae1cca
commit aea1f301fc
5 changed files with 123 additions and 87 deletions

View File

@ -17,7 +17,7 @@ class cygthread
VOID *arg;
bool is_freerange;
static DWORD main_thread_id;
static bool initialized;
static int initialized;
static DWORD WINAPI runner (VOID *);
static DWORD WINAPI free_runner (VOID *);
static DWORD WINAPI stub (VOID *);
@ -33,6 +33,7 @@ class cygthread
void * operator new (size_t);
static void * freerange ();
void exit_thread ();
static void terminate ();
};
#define cygself NULL