HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man5/!!!intro.5
________________________________________________________________
___ ___
a
aio(5) aio(5)
affect the amount of lockable memory at any given time.
The maximum priority change that can be specified in aio_reqprio is limited. The maximum priority
change value is tunable. The current maximum value can be obtained using the sysconf() call with the
argument _SC_AIO_PRIO_DELTA_MAX. The default value is 20.
The maximum number of asynchronous I/O operations that can be specified in a single lio_listio()
call is limited. This limit is tunable. The current maximum value can be obtained using the sysconf()
call with the argument _SC_AIO_LISTIO_MAX. The default maximum value is 256.
Some asynchronous I/O operations are also subject to both system-wide and per-process limits on the
number of simultaneously active threads. See pthread(3T).
Programming Limitations and Restrictions
Altering the contents of or deallocating memory associated with the aiocb referred to by aiocbp or the
buffer referred to by aiocbp->aio_buf while an asynchronous read operation is outstanding, that is
aio_return() has not been called for the aiocb, may produce unpredictable results.
EXAMPLES
The following code sequence illustrates an asynchronous read operation and polling for completion.
#include <fcntl.h>
#include <errno.h>
#include <aio.h>
char buf[4096];
int retval;
struct aiocb myaiocb;
bzero( &myaiocb, sizeof (struct aiocb));
myaiocb.aio_fildes = open( "/dev/null", O_RDONLY);
myaiocb.aio_offset = 0;
myaiocb.aio_buf = (void *) buf;
myaiocb.aio_nbytes = sizeof (buf);
myaiocb.aio_sigevent.sigev_notify = SIGEV_NONE;
retval = aio_read( &myaiocb );
if (retval) perror("aio:");
/* continue processing */
...
/* wait for completion */
while ( (retval = aio_error( &myaiocb) ) == EINPROGRESS) ;
/* free the aiocb */
retval = aio_return( &myaiocb);
SEE ALSO
aio_cancel(2), aio_error(2), aio_fsync(2), aio_read(2), aio_return(2), aio_suspend(2), aio_write(2), fsync(2),
getrlimit(2), lio_listio(2), read(2), write(2), pthread(3T).
STANDARDS CONFORMANCE
aio: POSIX Realtime Extensions, IEEE Std 1003.1b
HP-UX Release 11i: December 2000 − 4 − Section 5−−19
___
___