aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygtls.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-08 19:59:27 +0000
committerChristopher Faylor <me@cgf.cx>2004-02-08 19:59:27 +0000
commit6946073e784471e1fc51fffd705b0cbc4d58e730 (patch)
tree76e1a45c0d78871721c0c1c807bc89e343cd1454 /winsup/cygwin/cygtls.h
parentf5133f95b085c4fbe92fc5ca8fee9d5016257e4e (diff)
downloadnewlib-6946073e784471e1fc51fffd705b0cbc4d58e730.zip
newlib-6946073e784471e1fc51fffd705b0cbc4d58e730.tar.gz
newlib-6946073e784471e1fc51fffd705b0cbc4d58e730.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r--winsup/cygwin/cygtls.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index e2f5f0b..c1525a4 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)