DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

aio_mkcbs(S-osr5)


aio_mkcbs -- specify memory to be used for aiocb data structures

Syntax

cc . . . -lsuds
#include <aio.h>

aio_mkcbs(int start, int number);

Description

The aio_mkcbs(S-osr5) function allows an application to specify an area of memory to be used to store the aiocb structures for asynchronous I/O.

The functions aio_read(S-osr5), aio_write(S-osr5) and lio_listio(S-osr5) only accept aiocb structures that lie within the specified memory range and that are correctly aligned. The aiocb structures are expected to be accessed as if there is an array of such structures starting at the specified address. A process may only specify a single memory range for aiocb structures.

The start argument specifies the first address to be used to reference aiocb structures. The number argument specifies the number of aiocb structures that can be referenced from that address. The range of memory addresses given by the arguments must lie within a shared memory segment that was attached to the data segment of the calling process using suds_shmat(S-osr5). When multiple processes use the same shared memory segment to store the aiocb structures, each process must specify the same starting address.

Return values

The function aio_mkcbs returns the number of aiocb structures that can be referenced from the specified address. Otherwise it returns -1 and errno is set to indicate the error.

Diagnostics

For each of the following conditions, the aio_error function returns -1 and sets errno to the corresponding value:

[EINVAL]
The number of specified aiocb structures is invalid.

[ENXIO]
The range of memory addresses that will be used to store aiocb structures is invalid.

[ENOMEM]
There was not enough memory to satisfy the request.

See also

aio(FP), aio_error(S-osr5), aio_return(S-osr5), aio_write(S-osr5), lio_listio(S-osr5), suds_shmat(S-osr5)

Standards conformance

aio_mkcbs is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2005 System Services (S-osr5)
SCO OpenServer Release 6.0.0 -- 02 June 2005