From 6946073e784471e1fc51fffd705b0cbc4d58e730 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 8 Feb 2004 19:59:27 +0000 Subject: * localtime.cc (localtime_r): Call tzset. * Makefile.in: Make version.h/cygwin.din version check a warning since it is not foolproof. * cygheap.h (CYGHEAPSIZE): Bump size down. * cygtls.h (_threadinfo::stacklock): New element. (_threadinfo::pop): Make regparm. (_threadinfo::lock): New function. (_threadinfo::unlock): New function. * cygtls.cc (_threadinfo::push): Wait for a lock on the stack before performing the operation. (_threadinfo::pop): Move to another file. * cygwin.din: More SIGFE changes. * exceptions.cc (try_to_debug): Always display messages on console. (handle_exceptions): Unwind stack only when actually about to call sig_send. (setup_handler): Lock stack prior to performing any operations. * gendef (_sigfe): Ditto. (_sigbe): Ditto. (_threadinfo::pop): Ditto. Move here. * gen_tlsoffsets: Generate positive offsets. * tlsoffsets.h: Regenerate. --- winsup/cygwin/cygtls.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/cygtls.h') diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index e2f5f0b3a..c1525a45d 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -111,6 +111,7 @@ struct _threadinfo struct _threadinfo *prev, *next; __stack_t *stackptr; int sig; + unsigned stacklock; __stack_t stack[TLS_STACK_SIZE]; unsigned padding[0]; @@ -123,7 +124,7 @@ struct _threadinfo static struct _threadinfo *find_tls (int sig); void remove (DWORD); void push (__stack_t, bool = false) __attribute__ ((regparm (3))); - __stack_t pop (); + __stack_t pop () __attribute__ ((regparm (1))); bool isinitialized () {return initialized == CYGTLS_INITIALIZED || initialized == CYGTLS_EXCEPTION;} void set_state (bool); void reset_exception (); @@ -136,6 +137,8 @@ struct _threadinfo void set_siginfo (struct sigpacket *) __attribute__ ((regparm (3))); void set_threadkill () {threadkill = true;} void reset_threadkill () {threadkill = false;} + int lock (int wait) __attribute__ ((regparm (2))); + void unlock () __attribute__ ((regparm (1))); /*gentls_offsets*/ }; #pragma pack(pop) -- cgit v1.2.3