aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-02-29 05:47:17 +0000
committerChristopher Faylor <me@cgf.cx>2000-02-29 05:47:17 +0000
commitb528f6349534c5851ed2f5477cef8d63b4b1dd20 (patch)
tree7875f8c220fd9323d77dc1ce05afb273927d082c /winsup
parentadbc0b0aa7e522b4a9302c082547e7bd889d0953 (diff)
downloadnewlib-b528f6349534c5851ed2f5477cef8d63b4b1dd20.zip
newlib-b528f6349534c5851ed2f5477cef8d63b4b1dd20.tar.gz
newlib-b528f6349534c5851ed2f5477cef8d63b4b1dd20.tar.bz2
* sigproc.cc (sig_send): Temporarily set priority to highest while sending a
signal.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/sigproc.cc5
2 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0c5892e..485e04e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 29 00:46:09 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * sigproc.cc (sig_send): Temporarily set priority to highest while
+ sending a signal.
+
Mon Feb 28 11:23:29 2000 Christopher Faylor <cgf@cygnus.com>
* pinfo.cc (set_myself): Add build date to strace output.
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 59d18a5..0c26f2f 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -776,7 +776,10 @@ sig_send (pinfo *p, int sig)
/* Notify the process that a signal has arrived.
*/
+ int prio;
SetLastError (0);
+ prio = GetThreadPriority (GetCurrentThread ());
+ (void) SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
if (!ReleaseSemaphore (thiscatch, 1, NULL) && (int) GetLastError () > 0)
{
/* Couldn't signal the semaphore. This probably means that the
@@ -826,6 +829,8 @@ sig_send (pinfo *p, int sig)
rc = WAIT_OBJECT_0;
}
+ SetThreadPriority (GetCurrentThread (), prio);
+
if (rc == WAIT_OBJECT_0)
rc = 0; // Successful exit
else