diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_yield.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_yield.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_yield.c b/lib/libc_r/uthread/uthread_yield.c index a88a948..877f5e6 100644 --- a/lib/libc_r/uthread/uthread_yield.c +++ b/lib/libc_r/uthread/uthread_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) { |