From d542443ea4e9615e66b729fc4a93ec72a5305fff Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 28 Feb 2000 05:05:33 +0000 Subject: * 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. --- winsup/cygwin/sigproc.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') 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 -- cgit v1.2.3