1IO_SETUP(2)                Linux Programmer's Manual               IO_SETUP(2)
2
3
4

NAME

6       io_setup - Create an asynchronous I/O context
7

SYNOPSIS

9       #include <libaio.h>
10
11
12       int io_setup (unsigned nr_events, aio_context_t *ctxp);
13
14

DESCRIPTION

16       io_setup()  creates an asynchronous I/O context capable of receiving at
17       least nr_events.  ctxp must not point to an AIO  context  that  already
18       exists,  and must be initialized to 0 prior to the call.  On successful
19       creation of the AIO context, *ctxp is filled in with the resulting han‐
20       dle.
21
22

RETURN VALUE

24       io_setup() returns 0 on success; otherwise, one of the errors listed in
25       the "Errors" section is returned.
26
27

ERRORS

29       EINVAL ctxp is not initialized, or the specified nr_events exceeds  in‐
30              ternal limits. nr_events should be greater than 0.
31
32
33       EFAULT An invalid pointer is passed for ctxp.
34
35
36       ENOMEM Insufficient kernel resources are available.
37
38
39       EAGAIN The  specified  nr_events  exceeds the user's limit of available
40              events.
41
42
43       ENOSYS io_setup() is not implemented on this architecture.
44
45

CONFORMING TO

47       io_setup() is Linux specific and should not be used  in  programs  that
48       are intended to be portable.
49
50

VERSIONS

52       The  asynchronous  I/O system calls first appeared in Linux 2.5, August
53       2002.
54
55

SEE ALSO

57       io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2).
58
59

NOTES

61       The asynchronous I/O system calls were written by Benjamin LaHaise.
62
63

AUTHOR

65       Kent Yoder.
66
67
68
69Linux 2.4                         2003-02-21                       IO_SETUP(2)
Impressum