pthread_yield man page on Ultrix

Man page or keyword search:  
man Server   3690 pages
apropos Keyword Search (all sections)
Output format
Ultrix logo
[printable version]

pthread_yield(3thr)					   pthread_yield(3thr)

Name
       pthread_yield - Notifies the scheduler that the current thread is will‐
       ing to release its processor to other threads of	 the  same  or	higher
       priority.

Syntax
       #include <pthread.h>

       void pthread_yield();

Arguments
       None

Description
       This  routine notifies the scheduler that the current thread is willing
       to release its processor to other threads  of  the  same	 priority.  (A
       thread  releases its processor to a thread of a higher priority without
       calling this routine.)

       If the current thread's scheduling policy (as specified in  a  call  to
       pthread_attr_setsched or pthread_setscheduler) is SCHED_FIFO, SCHED_RR,
       or SCHED_OTHER, this routine yields the processor to other  threads  of
       the same priority. If no threads of the same priority are ready to exe‐
       cute, the thread continues.

       This routine allows knowledge of the details of an  application	to  be
       used  to increase fairness. It increases fairness of access to the pro‐
       cessor by removing the current thread  from  the	 processor.   It  also
       increases  fairness  of access to shared resources by removing the cur‐
       rent thread from the processor as soon  as  it  is  finished  with  the
       resource.

       Call  this  routine when a thread is executing code that denies	access
       to other	 threads  on  a	 uniprocessor  if  the	scheduling  policy  is
       SCHED_FIFO.

       Use  pthread_yield  carefully because misuse causes unnecessary context
       switching, which increases overhead without  increasing	fairness.  For
       example,	 it is counter-productive for a thread to yield while it has a
       needed resource locked.

Return Values
       None

							   pthread_yield(3thr)
[top]

List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net