aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-10 03:13:45 +0000
committerChristopher Faylor <me@cgf.cx>2003-01-10 03:13:45 +0000
commitd5223b2b0a89ff9ee3f5eabf713724ef2452092e (patch)
treebc09a0f213aff6d1139ac8c6a6c2e61a9b7e7036 /winsup/cygwin
parent65f207e8b906dad44844227fdb7cdcf397496552 (diff)
downloadnewlib-d5223b2b0a89ff9ee3f5eabf713724ef2452092e.zip
newlib-d5223b2b0a89ff9ee3f5eabf713724ef2452092e.tar.gz
newlib-d5223b2b0a89ff9ee3f5eabf713724ef2452092e.tar.bz2
* cygthread.cc (cygthread::cygthread): Be more noisy about odd condition.
* miscfuncs.cc (low_priority_sleep): Sleep in regular priority if that's what we're currently running at.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog13
-rw-r--r--winsup/cygwin/cygthread.cc2
-rw-r--r--winsup/cygwin/miscfuncs.cc11
3 files changed, 16 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3947fbe..f1a0713 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-09 Christopher Faylor <cgf@redhat.com>
+
+ * cygthread.cc (cygthread::cygthread): Be more noisy about odd
+ condition.
+ * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
+ that's what we're currently running at.
+
2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
* include/semaphore.h: Modify typedef for sem_t.
@@ -198,12 +205,12 @@
2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
- * localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
- in the Cygwin specific part of the routine.
+ * localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
+ in the Cygwin specific part of the routine.
2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
- * fhandler.cc (fhandler_base::open): Use "flags" rather than "mode"
+ * fhandler.cc (fhandler_base::open): Use "flags" rather than "mode"
in Win9X directory code.
2002-12-19 Steve Osborn <bub@io.com>
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index 5328a39..a354125 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -177,7 +177,7 @@ cygthread::cygthread (LPTHREAD_START_ROUTINE start, LPVOID param,
low_priority_sleep (0);
#else
{
- thread_printf ("waiting for %s<%p> to become active", __name, h);
+ system_printf ("waiting for %s<%p> to become active", __name, h);
low_priority_sleep (0);
}
#endif
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index e585659..a47625c 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -306,13 +306,12 @@ low_priority_sleep (DWORD secs)
staylow = true;
}
- /* Force any threads in normal priority to be scheduled */
- SetThreadPriority (thisthread, THREAD_PRIORITY_NORMAL);
- Sleep (0);
-
- SetThreadPriority (thisthread, THREAD_PRIORITY_IDLE);
+ if (curr_prio != THREAD_PRIORITY_NORMAL)
+ /* Force any threads in normal priority to be scheduled */
+ SetThreadPriority (thisthread, THREAD_PRIORITY_NORMAL);
Sleep (secs);
- if (!staylow)
+
+ if (!staylow || curr_prio == THREAD_PRIORITY_NORMAL)
SetThreadPriority (thisthread, curr_prio);
return curr_prio;
}