summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls.cc
diff options
context:
space:
mode:
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;