Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ thr_yield(3thread) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

priocntl(2)

thr_getscheduler(3thread)

thr_getprio(3thread)

thr_setprio(3thread)

thr_setscheduler(3thread)

thread(3thread)






       thr_yield(3thread)                                thr_yield(3thread)


       NAME
             thr_yield - yield the processor

       SYNOPSIS
             cc [options] -Kthread file
             #include <thread.h>
             void thr_yield(void);

       DESCRIPTION
             thr_yield() causes the calling thread to stop executing to
             allow another eligible thread (if any) to run.  The calling
             thread will remain in a runnable state.

             In this implementation, a multiplexed thread calling thr_yield
             will yield its lightweight process (LWP) only if another
             thread of higher or equal priority is runnable.  In that case
             the calling thread will be halted and it will be placed on the
             end of its priority queue.  If only lower priority threads are
             runnable, or no other thread is runnable, the caller will
             continue executing.  Likewise, a bound thread calling
             thr_yield will cause its LWP to yield the processor if another
             thread of higher or equal priority is runnable.

             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.

          Security Restrictions
             thr_yield requires no special permissions or privilege.

          Return Values
             None

          Errors
             None.

       USAGE
             thr_yield() is used by multithreaded applications which need
             to control their scheduling.

       REFERENCES
             priocntl(2), thr_getscheduler(3thread), thr_getprio(3thread),
             thr_setprio(3thread), thr_setscheduler(3thread),
             thread(3thread)



                           Copyright 1994 Novell, Inc.               Page 1








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026