SGINAP(2)							     SGINAP(2)
      sginap - timed sleep and processor	yield function
      #include <unistd.h>
     long sginap (long ticks);
     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.
     sleep(3), alarm(2), pause(2), schedctl(2),	setitimer(2).
     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 ]
 |