Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-06-08 18:42:44 +0400
committerChristopher Faylor <me@cgf.cx>2013-06-08 18:42:44 +0400
commit1eaf9215cb27dc368598e5937533411c360fddc9 (patch)
treea20b6405601b4f951cdec4fe515268e702999d02 /winsup/cygwin/miscfuncs.cc
parent5d35299e5102d92a995cf5aabd0fafa5b96a2c90 (diff)
revert accidentally checked in files
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r--winsup/cygwin/miscfuncs.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index c2b405eed..d0748ea6c 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -251,8 +251,10 @@ yield ()
/* MSDN implies that SleepEx will force scheduling of other threads.
Unlike SwitchToThread() the documentation does not mention other
cpus so, presumably (hah!), this + using a lower priority will
- stall this thread temporarily and cause another to run. */
- SleepEx (0L, false);
+ stall this thread temporarily and cause another to run.
+ Note: Don't use 0 timeout. This takes a lot of CPU if something
+ goes wrong. */
+ SleepEx (1L, false);
}
SetThreadPriority (GetCurrentThread (), prio);
}