iopause man page on Alpinelinux

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

iopause(3)							    iopause(3)

NAME
       iopause -

SYNTAX
       #include <iopause.h>

       int iopause(iopause_fd** x,unsigned int len,
		   struct taia deadline,struct taia stamp);

DESCRIPTION
       iopause checks for file descriptor readability or writability as speci‐
       fied by x[0].fd, x[0].events, x[1].fd, x[1].events,  ...,  x[len-1].fd,
       x[len-1].events.	 If x[i].events includes the bit IOPAUSE_READ, iopause
       checks for  readability	of  the	 descriptor  x[i].fd;  if  x[i].events
       includes	 the  bit IOPAUSE_WRITE, iopause checks for writability of the
       descriptor x[i].fd; other bits in x[i].events have undefined effects.

       iopause sets the IOPAUSE_READ bit in  x[i].revents  if  it  finds  that
       x[i].fd	is readable, and it sets the IOPAUSE_WRITE bit in x[i].revents
       if it finds that x[i].fd	 is  writable.	Beware	that  readability  and
       writability  may	 be  destroyed	at  any moment by other processes with
       access to the same ofile that x[i].fd refers to.

       If there is no readability or  writability  to  report,	iopause	 waits
       until  deadline	for  something	to  happen. iopause will return before
       deadline if a descriptor becomes readable or writable, or an interrupt‐
       ing  signal  arrives,  or  some	system-defined	amount of time passes.
       iopause sets revents in any case.

       You must put a current timestamp into stamp before calling iopause.

IMPLEMENTATION NOTES
       The current implementation of iopause uses the poll function if that is
       available.  On  some systems, poll needs to dynamically allocate kernel
       memory; when not much memory is available, iopause will return  immedi‐
       ately,  and  will  report  (often  incorrectly) that no descriptors are
       readable or writable. This is a kernel bug, and I encourage vendors  to
       fix it.

       If  poll is not available, iopause uses the select function. This func‐
       tion cannot see descriptor numbers past a system-defined	 limit,	 typi‐
       cally  256  or  1024;  iopause  will  artificially  pretend  that those
       descriptors are never readable or writable.

       Future implementations of iopause may work  around  these  problems  on
       some systems, at the expense of chewing up all available CPU time.

       Both  poll  and select use relative timeouts rather than absolute dead‐
       lines.  Some kernels round the timeout down to a multiple  of  10  mil‐
       liseconds;  this	 can  burn  quite  a  bit  of CPU time as the deadline
       approaches. iopause compensates for this by adding 20  milliseconds  to
       the timeout.

SEE ALSO
       select(2), poll(3), taia_now(3)

								    iopause(3)
[top]

List of man pages available for Alpinelinux

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