~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/libaio/man/aio_error.3

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH aio_error 3 2002-09-12 "Linux 2.4" Linux AIO"
 
2
.SH NAME
 
3
aio_error \- Getting the Status of AIO Operations
 
4
.SH SYNOPSYS
 
5
.nf
 
6
.B #include <errno.h>
 
7
.sp
 
8
.br 
 
9
.B #include <aio.h>
 
10
.sp
 
11
.br
 
12
.BI "int aio_error (const struct aiocb *aiocbp)"
 
13
.fi
 
14
.SH DESCRIPTION
 
15
The function
 
16
.IR aio_error
 
17
determines the error state of the request described by the
 
18
.IR "struct aiocb"
 
19
variable pointed to by 
 
20
.I aiocbp
 
21
 
22
 
 
23
When the operation is performed truly asynchronously (as with
 
24
.IR "aio_read"
 
25
and 
 
26
.IR "aio_write"
 
27
and with 
 
28
.IR "lio_listio"
 
29
when the mode is 
 
30
.IR "LIO_NOWAIT"
 
31
), one sometimes needs to know whether a
 
32
specific request already terminated and if so, what the result was.
 
33
When the sources are compiled with 
 
34
.IR "_FILE_OFFSET_BITS == 64"
 
35
this function is in fact 
 
36
.IR "aio_error64"
 
37
since the LFS interface transparently replaces the normal implementation.
 
38
.SH "RETURN VALUES"
 
39
If the request has not yet terminated the value returned is always
 
40
.IR "EINPROGRESS"
 
41
.  Once the request has terminated the value
 
42
.IR "aio_error"
 
43
returns is either 
 
44
.I 0
 
45
if the request completed successfully or it returns the value which would be stored in the
 
46
.IR "errno"
 
47
variable if the request would have been done using
 
48
.IR "read"
 
49
 
50
.IR "write"
 
51
, or 
 
52
.IR "fsync"
 
53
.
 
54
.SH ERRORS
 
55
.TP
 
56
.IR "ENOSYS"
 
57
if it is not implemented.  It
 
58
could also return 
 
59
.TP
 
60
.IR "EINVAL"
 
61
if the 
 
62
.I aiocbp
 
63
parameter does not
 
64
refer to an asynchronous operation whose return status is not yet known.
 
65
.SH "SEE ALSO"
 
66
.BR aio(3),
 
67
.BR aio_cancel(3),
 
68
.BR aio_cancel64(3),
 
69
.BR aio_error64(3),
 
70
.BR aio_fsync(3),
 
71
.BR aio_fsync64(3),
 
72
.BR aio_init(3),
 
73
.BR aio_read(3),
 
74
.BR aio_read64(3),
 
75
.BR aio_return(3),
 
76
.BR aio_return64(3),
 
77
.BR aio_suspend(3),
 
78
.BR aio_suspend64(3),
 
79
.BR aio_write(3),
 
80
.BR aio_write64(3),
 
81
.BR errno(3),