DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

aio_mkcbs(S)


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) 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), aio_write(S) and lio_listio(S) 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). 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), aio_return(S), aio_write(S), lio_listio(S), suds_shmat(S)

Standards conformance

aio_mkcbs is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 System Services (S)
SCO OpenServer Release 5.0.7 -- 11 February 2003