Multithreaded Programming Guide

Yield Thread Execution

sched_yield(3R)

Use sched_yield(3R) to cause the current thread to yield its execution in favor of another thread with the same or greater priority.

Prototype:
int	 sched_yield(void);
#include <sched.h>

int ret;

ret = sched_yield();

Return Values

Returns zero after completing successfully. Otherwise -1 is returned and errno is set to indicate the error condition.


ENOSYS

sched_yield(3R) is not supported in this implementation.