Revision: 331
Author: bardtx
Date: 2006-06-03 21:17:41 -0700 (Sat, 03 Jun 2006)
ViewCVS: http://svn.sourceforge.net/cadcdev/?rev=331&view=rev
Log Message:
-----------
kos: Make thd_sleep(0) work properly.
Modified Paths:
--------------
kos/kernel/thread/thread.c
Modified: kos/kernel/thread/thread.c
===================================================================
--- kos/kernel/thread/thread.c 2006-05-27 14:08:53 UTC (rev 330)
+++ kos/kernel/thread/thread.c 2006-06-04 04:17:41 UTC (rev 331)
@@ -597,6 +597,13 @@
return;
}
+ /* A timeout of zero is the same as thd_pass() and passing zero
+ down to genwait_wait() causes bad juju. */
+ if (!ms) {
+ thd_pass();
+ return;
+ }
+
/* We can genwait on a non-existant object here with a timeout and
have the exact same effect; as a nice bonus, this collapses both
sleep cases into a single case, which is nice for scheduling
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|