summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_yield.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-03-08 02:37:27 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-03-08 02:37:27 +0000
commit08d6f1187e3ed808ed20d9bfcd8ffdc113f7cc71 (patch)
treeada1c921b6d7cc732be68cf60b549c1c883a053b /lib/libpthread/thread/thr_yield.c
parentdc79e6f23bee4d81f6e46710631f3a41517e2f42 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_yield.c')
-rw-r--r--lib/libpthread/thread/thr_yield.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_yield.c b/lib/libpthread/thread/thr_yield.c
index a88a94836b7a..877f5e6b0e85 100644
--- a/lib/libpthread/thread/thr_yield.c
+++ b/lib/libpthread/thread/thr_yield.c
@@ -34,6 +34,20 @@
#include <pthread.h>
#include "pthread_private.h"
+int
+sched_yield(void)
+{
+ /* Reset the accumulated time slice value for the current thread: */
+ _thread_run->slice_usec = -1;
+
+ /* Schedule the next thread: */
+ _thread_kern_sched(NULL);
+
+ /* Always return no error. */
+ return(0);
+}
+
+/* Draft 4 yield */
void
pthread_yield(void)
{