Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-12-05 08:29:17 +0300
committerChristopher Faylor <me@cgf.cx>2003-12-05 08:29:17 +0300
commitaeab6ea65810c74e71e33e367ec4eb436038de39 (patch)
tree5d853d30870b6ee4ad268e57122dffa48cd1c092 /winsup/cygwin/cygthread.cc
parent78f3155cedd30008952ff9e2c3c8176775ec4890 (diff)
* cygthread.cc (cygthread::stub2): Remove myself from the list of threads
monitored by signals since this thread will never call raise or sigwait. (cygthread::simplestub2): Ditto. Set ev here. (cygthread::cygthread): Don't set ev here for freerange thread.
Diffstat (limited to 'winsup/cygwin/cygthread.cc')
-rw-r--r--winsup/cygwin/cygthread.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index 34111fd67..2a120fb61 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -40,11 +40,10 @@ void
cygthread::stub2 (void *arg, void *)
{
exception_list except_entry;
-
/* Initialize this thread's ability to respond to things like
SIGSEGV or SIGFPE. */
init_exceptions (&except_entry);
-
+ _my_tls.remove (); // Remove me from signal chain -- not signalable.
cygthread *info = (cygthread *) arg;
if (info->arg == cygself)
@@ -108,13 +107,14 @@ void
cygthread::simplestub2 (void *arg, void *)
{
exception_list except_entry;
-
/* Initialize this thread's ability to respond to things like
SIGSEGV or SIGFPE. */
init_exceptions (&except_entry);
+ _my_tls.remove (); // Remove me from signal chain -- not signalable.
cygthread *info = (cygthread *) arg;
info->stack_ptr = &arg;
+ info->ev = info->h;
info->func (info->arg == cygself ? info : info->arg);
ExitThread (0);
}
@@ -197,8 +197,6 @@ cygthread::cygthread (LPTHREAD_START_ROUTINE start, LPVOID param,
this, 0, &id);
if (!h)
api_fatal ("thread handle not set - %p<%p>, %E", h, id);
- if (is_freerange)
- ev = h;
thread_printf ("created thread %p", h);
}
}