sched_yield(PTHREAD)
sched_yield --
yield the processor
Synopsis
cc [options] -Kthread file
#include <sched.h>
int sched_yield(void);
Description
sched_yield causes the calling thread
to stop executing
to allow another eligible thread of higher or equal
priority (if any) to run.
The calling thread will remain in a runnable state.
sched_yield forces the running thread
to relinquish the processor until it again becomes
the head of its thread list.
It takes no arguments.
This function should be viewed as a
hint from the caller to the system,
indicating that the caller has
reached a point at which it
is convenient to yield the processor
to other threads.
sched_yield requires no special
permissions or privilege.
Return values
None.
The sched_yield function always returns 0.
Diagnostics
None.
Standards Compliance
The Single UNIX Specification, Version 2; The Open Group.
References
Intro(PTHREAD),
priocntl(S),
pthread_getschedparam(PTHREAD),
pthread_setschedparam(PTHREAD),
sched(F)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005