aio_sgi_init(3)
aio_sgi_init, aio_sgi_init64 - asynchronous I/O initialization
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME aio_sgi_init, aio_sgi_init64 - asynchronous I/O initialization C SYNOPSIS #include <aio.h> void aio_sgi_init(aioinit_t *); void aio_sgi_init64(aioinit_t *); DESCRIPTION The optional aio_sgi_init() function allows the calling process to initialize the asynchronous I/O interface. If this function is not called, the asynchronous I/O interface is initialized the first time a call is made to aio_read(), aio_write() or lio_listio(). aio_sgi_init() takes an aioinit_t * as an argument. If this argument is NULL, default initialization values are used. Initialization of the interface includes starting up slave threads which are used to carry out I/O requests. This is significant if a process that runs isolated intends to use asynchronous I/O. An explicit call to aio_sgi_init() prior to isolating will cause the slave threads on non-isolated processors. An explicit call to aio_sgi_init() or implicit initialization of the interface by calls to aio_read, aio_write or lio_listio() from a process that is running on an isolated processor cause the aio threads to run on the same isolated processor as the caller. The aioinit structure contains the following fields: aio_threads: The number of threads that the aio library will use from user space. While the user can queue up many operations to be done by the aio library, they are currently passed to the kernel one at a time by each thread. The aio_threads value allows the use to pick the level of parallelism that their application needs. The current default is 5. aio_locks: This is used by realtime programs to pre-allocate needed data structures so that real time programs do not need to allocate them in critical areas. This should be set to the maximum number of simultaneous lio_listio(LIO_NOWAIT), aio_fsync(), and aio_suspend() that your program will be executing. Nothing bad will happen if you pick a number that is too small except that the program may need to call malloc, and thus possibly cause problems for some realtime programs. The current default is 3 aio_numusers: Due to its use of IRIX semaphores (see usconfig(3P)) Multi threaded programs must pass the number of sprocs or pthreads that the application contains to the AIO library. Passing a number that is too small can result in program deadlocks and other errors. The current default is 5. aio_num, aio_debug, and aio_reserved are currently unused and ignored. aio_usedba is used by a few specific applications, and all other programs must set it to zero for correct operation. The aio_sgi_init64() routine is identical to aio_sgi_init() except that it takes an aioinit64_t * (see <aio.h>) as an argument. It should be used for explicit initialization of parameters used by aio_read64(), aio_write64() and lio_listio64(). SEE ALSO aio_write(3), lio_listio(3), aio_error(3), aio_return(3), aio_cancel(3), mpadmin(1), realtime(5).