diff options
author | Christopher Faylor <me@cgf.cx> | 2000-02-28 05:05:33 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-02-28 05:05:33 +0000 |
commit | d542443ea4e9615e66b729fc4a93ec72a5305fff (patch) | |
tree | c006010e903c36adb0a74879f0f2999224ee1c30 /winsup/cygwin/sigproc.cc | |
parent | 1dc94f73700244d77cf9ceb5d4e65fd71a2f65f0 (diff) | |
download | cygnal-d542443ea4e9615e66b729fc4a93ec72a5305fff.tar.gz cygnal-d542443ea4e9615e66b729fc4a93ec72a5305fff.tar.bz2 cygnal-d542443ea4e9615e66b729fc4a93ec72a5305fff.zip |
* dcrt0.cc (set_os_type): Record OS name string.
(getprogname): Eliminate obsolete function.
(dll_crt0_1): Move initial strace initialization output to set_myself.
* exceptions.cc (interruptible): Add debugging output.
(interrupt_setup): New function.
(interrupt_now): Use interrupt_setup to set up common interrupt handler stuff.
(interrupt_on_return): Ditto.
(call_handler): Move signal_arrived arm and clear threads to region where
signalled thread is suspended or suffer races.
* pinfo.cc (set_myself): Output interesting information when strace is first
initialized. Initialize progname here.
* sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal are
sent synchronously.
* strace.cc (strace_vsprintf): Move code into strace program.
* uname.cc (uname): Use 'osname' global to construct cygwin name + Windows type
+ version.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 991d91ffb..9c868edca 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -550,7 +550,7 @@ sig_clear (int sig) /* Force the wait_sig thread to wake up and scan the sigtodo array. */ extern "C" int __stdcall -sig_dispatch_pending (int force) +sig_dispatch_pending (int justwake) { if (!hwait_sig) return 0; @@ -559,7 +559,7 @@ sig_dispatch_pending (int force) #ifdef DEBUGGING sip_printf ("pending_signals %d", was_pending); #endif - if (!was_pending && !force) + if (!was_pending && !justwake) #ifdef DEBUGGING sip_printf ("no need to wake anything up"); #else @@ -568,7 +568,9 @@ sig_dispatch_pending (int force) else { wait_for_me (); - if (ReleaseSemaphore (sigcatch_nosync, 1, NULL)) + if (!justwake) + (void) sig_send (myself, __SIGFLUSH); + else if (ReleaseSemaphore (sigcatch_nosync, 1, NULL)) #ifdef DEBUGGING sip_printf ("woke up wait_sig"); #else @@ -578,6 +580,7 @@ sig_dispatch_pending (int force) /*sip_printf ("I'm going away now")*/; else system_printf ("%E releasing sigcatch_nosync(%p)", sigcatch_nosync); + } return was_pending; } @@ -958,7 +961,7 @@ getsem (pinfo *p, const char *str, int init, int max) DWORD winpid = GetCurrentProcessId (); h = CreateSemaphore (allow_ntsec ? sec_user (sa_buf) : &sec_none_nih, - init, max, str = shared_name (str, winpid)); + init, max, str = shared_name (str, winpid)); p = myself; } else |