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>2005-02-01 19:49:13 +0300
committerChristopher Faylor <me@cgf.cx>2005-02-01 19:49:13 +0300
commit74d8e12e16d5d5416ce37100f8767ff0affa90ec (patch)
treed10e1a02e7ba0ff1322cd3f3dd68c101aaf646f5 /winsup/cygwin/cygthread.cc
parent01a94cf8662ffe333b0b75fc98aa44ada4320aeb (diff)
* cygthread.cc (cygthread::terminate_thread): Wait briefly for notification
event in the event that the thread was actually in the process of exiting. * pipe.cc (fhandler_pipe::dup): read_state is not supposed to be inheritable. Fix that. * path.cc (path_conv::check): Set symlen = 0 to avoid a compiler warning. * devices.h (devices::parsedisk): Declare new function. * devices.in (devices::parsedisk): Define new function. * dtable.cc (dtable::init_std_file_from_handle): Use device numbers rather than name. * fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate disk names from numeric codes. (This was broken on two of my systems previously and is still broken now)
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 adeecb320..3f8286a88 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -73,7 +73,7 @@ cygthread::stub (VOID *arg)
info->func (info->arg == cygself ? info : info->arg);
/* ...so the above should always return */
- /* If stack_ptr is NULL, the above function has set that to indicate
+ /* If func is NULL, the above function has set that to indicate
that it doesn't want to alert anyone with a SetEvent and should
just be marked as no longer inuse. Hopefully the function knows
that it is doing. */
@@ -175,10 +175,6 @@ cygthread::cygthread (LPTHREAD_START_ROUTINE start, LPVOID param,
else
{
stack_ptr = NULL;
-#ifdef DEBUGGING
- if (__oldname)
- system_printf ("__oldname %s, terminated %d", __oldname, terminated);
-#endif
h = CreateThread (&sec_none_nih, 0, is_freerange ? simplestub : stub,
this, 0, &id);
if (!h)
@@ -272,6 +268,8 @@ cygthread::terminate_thread ()
(void) TerminateThread (h, 0);
(void) WaitForSingleObject (h, INFINITE);
+ if (ev)
+ WaitForSingleObject (ev, 0);
if (!inuse || exiting)
return;