ia64/xen-unstable

view tools/libaio/man/io_getevents.3 @ 10736:2937703f0ed0

Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README.
author jchesterfield@dhcp92.uk.xensource.com
date Thu Jul 13 10:13:26 2006 +0100 (2006-07-13)
parents
children
line source
1 ./"/* io_getevents:
2 ./" * Attempts to read at least min_nr events and up to nr events from
3 ./" * the completion queue for the aio_context specified by ctx_id. May
4 ./" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range,
5 ./" * if nr is out of range, if when is out of range. May fail with
6 ./" * -EFAULT if any of the memory specified to is invalid. May return
7 ./" * 0 or < min_nr if no events are available and the timeout specified
8 ./" * by when has elapsed, where when == NULL specifies an infinite
9 ./" * timeout. Note that the timeout pointed to by when is relative and
10 ./" * will be updated if not NULL and the operation blocks. Will fail
11 ./" * with -ENOSYS if not implemented.
12 ./" */
13 ./"asmlinkage long sys_io_getevents(io_context_t ctx_id,
14 ./" long min_nr,
15 ./" long nr,
16 ./" struct io_event *events,
17 ./" struct timespec *timeout)
18 ./"
19 .TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO"
20 .SH NAME
21 io_getevents \- Read resulting events from io requests
22 .SH SYNOPSIS
23 .nf
24 .B #include <errno.h>
25 .sp
26 .br
27 .B #include <libaio.h>
28 .br
29 .sp
30 struct iocb {
31 void *data;
32 unsigned key;
33 short aio_lio_opcode;
34 short aio_reqprio;
35 int aio_fildes;
36 };
37 .sp
38 struct io_event {
39 unsigned PADDED(data, __pad1);
40 unsigned PADDED(obj, __pad2);
41 unsigned PADDED(res, __pad3);
42 unsigned PADDED(res2, __pad4);
43 };
44 .sp
45 .BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");"
47 .fi
48 .SH DESCRIPTION
49 Attempts to read up to nr events from
50 the completion queue for the aio_context specified by ctx.
51 .SH "RETURN VALUES"
52 May return
53 0 if no events are available and the timeout specified
54 by when has elapsed, where when == NULL specifies an infinite
55 timeout. Note that the timeout pointed to by when is relative and
56 will be updated if not NULL and the operation blocks. Will fail
57 with ENOSYS if not implemented.
58 .SH ERRORS
59 .TP
60 .B EINVAL
61 if ctx_id is invalid, if min_nr is out of range,
62 if nr is out of range, if when is out of range.
63 .TP
64 .B EFAULT
65 if any of the memory specified to is invalid.
66 .SH "SEE ALSO"
67 .BR io(3),
68 .BR io_cancel(3),
69 .BR io_fsync(3),
70 .BR io_prep_fsync(3),
71 .BR io_prep_pread(3),
72 .BR io_prep_pwrite(3),
73 .BR io_queue_init(3),
74 .BR io_queue_release(3),
75 .BR io_queue_run(3),
76 .BR io_queue_wait(3),
77 .BR io_set_callback(3),
78 .BR io_submit(3),
79 .BR errno(3)