*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/sginap (2)              
Title
Content
Arch
Section
 

Contents


SGINAP(2)							     SGINAP(2)


NAME    [Toc]    [Back]

     sginap - timed sleep and processor	yield function

C SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>
     long sginap (long ticks);

DESCRIPTION    [Toc]    [Back]

     The sginap	system call provides two functions.  With an argument of 0, it
     yields the	processor to any higher	or equal priority threads immediately,
     thus potentially allowing another thread to run.  Note that because
     normally the user has no direct control over the exact priority of	a
     given thread, this	does not guarantee that	another	thread will run.

     With an argument which is non-zero, sginap	will suspend the thread	for
     between ticks-1 and ticks clock ticks.  That is, it will suspend for at
     least ticks-1 clock ticks,	but less than ticks clock ticks.  The length
     of	a clock	tick is	defined	by CLK_TCK in the include file <limits.h>.
     This is the same for all SGI systems.

     Note that if the calling thread is	interrupted by a signal	before the
     specified number of ticks has elapsed, sginap will	return prematurely.

SEE ALSO    [Toc]    [Back]

      
      
     sleep(3), alarm(2), pause(2), schedctl(2),	setitimer(2).

DIAGNOSTICS    [Toc]    [Back]

     If	the calling thread remains suspended for the requested number of
     ticks, sginap returns 0.  If, however, the	thread is interrupted
     prematurely by a signal, it returns the number of unexpired ticks in the
     specified period.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
sched_yield FreeBSD yield processor
sched_yield Linux yield the processor
sched_yield IRIX yield the processor
print_pset_error Tru64 Prints an error from a processor set function
pthread_yield OpenBSD yield control of the current thread
sched_yield Tru64 Signals scheduler a willingness to yield to another thread
timedc IRIX timed control program
timedc FreeBSD timed control program
timedc Tru64 Controls the timed daemon
cron HP-UX timed-job execution daemon
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service