summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls.cc
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.cc
parentf5133f95b085c4fbe92fc5ca8fee9d5016257e4e (diff)
downloadcygnal-6946073e784471e1fc51fffd705b0cbc4d58e730.tar.gz
cygnal-6946073e784471e1fc51fffd705b0cbc4d58e730.tar.bz2
cygnal-6946073e784471e1fc51fffd705b0cbc4d58e730.zip
* 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.cc')
-rw-r--r--winsup/cygwin/cygtls.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index a74412637..becde2d73 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -155,24 +155,14 @@ _threadinfo::remove (DWORD wait)
void
_threadinfo::push (__stack_t addr, bool exception)
{
+ if (exception)
+ lock (true);
*stackptr++ = (__stack_t) addr;
+ if (exception)
+ unlock ();
set_state (exception);
}
-__stack_t
-_threadinfo::pop ()
-{
-#ifdef DEBUGGING
- assert (stackptr > stack);
-#endif
- __stack_t res = *--stackptr;
-#ifdef DEBUGGING
- *stackptr = 0;
- debug_printf ("popped %p, stack %p, stackptr %p", res, stack, stackptr);
-#endif
- return res;
-}
-
#define BAD_IX ((size_t) -1)
static size_t NO_COPY threadlist_ix = BAD_IX;