diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-06 18:08:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-06 18:08:38 +0000 |
commit | 2b6d15a90833dd2e3aa2aa758813e721fe94a0ca (patch) | |
tree | 62d68c6e884f3f1f357148775903a18dc0a58350 /winsup/cygwin/cygtls.h | |
parent | bdfb870e4afae49b54f98f8486ee04b41b153b28 (diff) | |
download | cygnal-2b6d15a90833dd2e3aa2aa758813e721fe94a0ca.tar.gz cygnal-2b6d15a90833dd2e3aa2aa758813e721fe94a0ca.tar.bz2 cygnal-2b6d15a90833dd2e3aa2aa758813e721fe94a0ca.zip |
* cygtls.h: Add more "don't parse this" guards.
(_threadinfo::init_thread): Rename from 'init'.
(_threadinfo::init): Declare new function.
(_threadinfo::protect_linked_list): Declare new critical section.
* dcrt0.cc (dll_crt0_1): Call init_thread to initialize thread stuff.
(_dll_crt0): Call _threadinfo::init prior to invoking dll_crt0_1.
* exceptions.cc (_threadinfo::init_thread): Rename from 'init'.
(_threadinfo::init): Define new function. Protect linked list manipulation
with new critical section.
(_threadinfo::call): Reflect function name change.
(_threadinfo::remove): Protect linked list manipulation with new critical
section
* gentls_offsets: Rework to allow multi-line "don't parse this" protection.
* init.cc (dll_entry): Don't remove threads info stuff here since the remove
function uses a critical section which can't be used during thread creation or
destruction.
* thread.cc (pthread::exit): Call _threadinfo remove function here.
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r-- | winsup/cygwin/cygtls.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index ec6087af8..20913bebd 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -16,7 +16,7 @@ details. */ /* Please keep this file simple. Changes to the below structure may require acompanying changes to the very simple parser in the perl script - 'gentls_offsets'. */ + 'gentls_offsets' (<<-- start parsing here). */ #pragma pack(push,4) typedef __uint32_t __stack_t; @@ -40,7 +40,10 @@ struct _threadinfo int sig; __stack_t *stackptr; - void init (void *); + /*gentls_offsets*/ + static CRITICAL_SECTION protect_linked_list; + static void init (); + void init_thread (void *); static void call (void (*) (void *, void *), void *); void call2 (void (*) (void *, void *), void *, void *); void remove (); @@ -54,6 +57,7 @@ struct _threadinfo void __stdcall interrupt_setup (int sig, void *handler, struct sigaction& siga, __stack_t retaddr) __attribute__((regparm(3))); operator HANDLE () const {return tid->win32_obj_id;} + /*gentls_offsets*/ }; #pragma pack(pop) |