NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUE | ATTRIBUTES
$(OS_DIR)/lib/libpthreads.a #include <pthread.h>void pthread_yield(void);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The pthread_yield() function yields the processor to a runnable thread queued at the same priority as the current thread, if there is one. If there are several, the thread that has been waiting the longest will be executed. The thread that invoked pthread_yield() remains runnable and will be re-queued at the end of the list of threads waiting to run at the given priority level.
If there are no threads waiting to run at the same priority, pthread_yield() returns immediately.
The sched_yield() function is identical to pthread_yield() .
The pthread_yield() and sched_yield() functions do not return a value.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUE | ATTRIBUTES