4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 03:27:46 +08:00

* sigproc.cc (remove_proc): Don't do busy loop when execing since thread could

have been terminated prior to setting flag.
* signal.cc (sigwaitinfo): Zero event before closing to signal other threads
that it is no longer available.
This commit is contained in:
Christopher Faylor 2011-11-21 19:13:30 +00:00
parent 8b0e312bf1
commit 15660c23ab
3 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2011-11-21 Christopher Faylor <me.cygwin2011@cgf.cx>
* sigproc.cc (remove_proc): Don't do busy loop when execing since
thread could have been terminated prior to setting flag.
* signal.cc (sigwaitinfo): Zero event before closing to signal other
threads that it is no longer available.
2011-11-18 Corinna Vinschen <corinna@vinschen.de> 2011-11-18 Corinna Vinschen <corinna@vinschen.de>
* shared.cc (get_shared_parent_dir): Use global shared_parent_dir * shared.cc (get_shared_parent_dir): Use global shared_parent_dir

View File

@ -608,6 +608,8 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info)
__seterrno (); __seterrno ();
res = -1; res = -1;
} }
_my_tls.event = NULL;
CloseHandle (h); CloseHandle (h);
sigproc_printf ("returning signal %d", res); sigproc_printf ("returning signal %d", res);
return res; return res;

View File

@ -1106,8 +1106,9 @@ remove_proc (int ci)
moving it or it may become confused. The chances are very high that moving it or it may become confused. The chances are very high that
the proc_waiter thread has already done this by the time we the proc_waiter thread has already done this by the time we
get here. */ get here. */
while (!procs[nprocs].waiter_ready) if (!have_execed)
yield (); while (!procs[nprocs].waiter_ready)
yield ();
procs[ci] = procs[nprocs]; procs[ci] = procs[nprocs];
} }
return 0; return 0;