diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-22 20:16:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-22 20:16:31 +0000 |
commit | d525130f0403aff59eca72693d9a15648741e88e (patch) | |
tree | 16549d8075aa4ee8df6f5f6c64717b4218072640 /winsup/cygwin/cygthread.h | |
parent | 329b9ead3ea5a48d452ce48538a4584835c70555 (diff) | |
download | cygnal-d525130f0403aff59eca72693d9a15648741e88e.tar.gz cygnal-d525130f0403aff59eca72693d9a15648741e88e.tar.bz2 cygnal-d525130f0403aff59eca72693d9a15648741e88e.zip |
* cygthread.cc (cygthread::exiting): New variable.
(cygthread::initialized): Delete.
(cygthread::stub): Use exiting variable to determine when to exit.
(cygthread::runner): Delete.
(cygthread_protect): New variable.
(cygthread::init): Don't start runner thread. Initialize muto for list
protection.
(cygthread::freerange): Return pointer to cygthread.
(cygthread::operator new): Change logic to start threads on an as-needed basis.
(cygthread::detach): Don't zero id.
(cygthread::terminate): Don't kill any executing threads. Just set exiting
flag.
* cygthread.h (cygthread): Reflect above changes.
* dcrt0.cc (dll_crt0_1): Move cygthread initialization later.
* fork.cc (fork_child): Do fdtab fixup after dll fixup or (apparently) winsock
may allocate memory in dll load address.
Diffstat (limited to 'winsup/cygwin/cygthread.h')
-rw-r--r-- | winsup/cygwin/cygthread.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/cygthread.h b/winsup/cygwin/cygthread.h index ded205f30..774c656da 100644 --- a/winsup/cygwin/cygthread.h +++ b/winsup/cygwin/cygthread.h @@ -18,9 +18,7 @@ class cygthread VOID *arg; bool is_freerange; static DWORD main_thread_id; - static int initialized; - static DWORD WINAPI runner (VOID *); - static DWORD WINAPI free_runner (VOID *); + static bool exiting; static DWORD WINAPI stub (VOID *); static DWORD WINAPI simplestub (VOID *); public: @@ -32,7 +30,7 @@ class cygthread operator HANDLE (); static bool is (); void * operator new (size_t); - static void * freerange (); + static cygthread *freerange (); void exit_thread (); static void terminate (); bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);} |