diff options
Diffstat (limited to 'sched.c')
-rw-r--r-- | sched.c | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -25,8 +25,7 @@ #define ENOSUP 0 -#include <errno.h> - +#include "sched.h" #include "pthread.h" #include "implement.h" @@ -150,3 +149,34 @@ int sched_get_priority_min(int policy) /* This is independent of scheduling policy in Win32. */ return THREAD_PRIORITY_LOWEST; } + +int sched_yield(void) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * This function indicates that the calling thread is + * willing to give up some time slices to other threads. + * + * PARAMETERS + * N/A + * + * + * DESCRIPTION + * This function indicates that the calling thread is + * willing to give up some time slices to other threads. + * NOTE: Since this is part of POSIX 1003.1b + * (realtime extensions), it is defined as returning + * -1 if an error occurs and sets errno to the actual + * error. + * + * RESULTS + * 0 successfully created semaphore, + * ENOSYS sched_yield not supported, + * + * ------------------------------------------------------ + */ +{ + Sleep(0); + + return 0; +} |