1*e8cfad37Sjruoho.\" $NetBSD: aio_error.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $ 2ed3e2de2Srmind.\" 3ed3e2de2Srmind.\" Copyright (c) 1999 Softweyr LLC. 4ed3e2de2Srmind.\" All rights reserved. 5ed3e2de2Srmind.\" 6ed3e2de2Srmind.\" Redistribution and use in source and binary forms, with or without 7ed3e2de2Srmind.\" modification, are permitted provided that the following conditions 8ed3e2de2Srmind.\" are met: 9ed3e2de2Srmind.\" 1. Redistributions of source code must retain the above copyright 10ed3e2de2Srmind.\" notice, this list of conditions and the following disclaimer. 11ed3e2de2Srmind.\" 2. Redistributions in binary form must reproduce the above copyright 12ed3e2de2Srmind.\" notice, this list of conditions and the following disclaimer in the 13ed3e2de2Srmind.\" documentation and/or other materials provided with the distribution. 14ed3e2de2Srmind.\" 15ed3e2de2Srmind.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND 16ed3e2de2Srmind.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17ed3e2de2Srmind.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18ed3e2de2Srmind.\" ARE DISCLAIMED. IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE 19ed3e2de2Srmind.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20ed3e2de2Srmind.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21ed3e2de2Srmind.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22ed3e2de2Srmind.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23ed3e2de2Srmind.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24ed3e2de2Srmind.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25ed3e2de2Srmind.\" SUCH DAMAGE. 26ed3e2de2Srmind.\" 27ed3e2de2Srmind.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_error.2,v 1.20 2006/09/26 09:47:46 vd Exp $ 28ed3e2de2Srmind.\" 29*e8cfad37Sjruoho.Dd May 17, 2010 30ed3e2de2Srmind.Dt AIO_ERROR 3 31ed3e2de2Srmind.Os 32ed3e2de2Srmind.Sh NAME 33ed3e2de2Srmind.Nm aio_error 34ed3e2de2Srmind.Nd retrieve error status of asynchronous I/O operation (REALTIME) 35ed3e2de2Srmind.Sh LIBRARY 36ed3e2de2Srmind.Lb librt 37ed3e2de2Srmind.Sh SYNOPSIS 38ed3e2de2Srmind.In aio.h 39ed3e2de2Srmind.Ft int 40ed3e2de2Srmind.Fn aio_error "const struct aiocb *aiocbp" 41ed3e2de2Srmind.Sh DESCRIPTION 42ed3e2de2SrmindThe 43ed3e2de2Srmind.Fn aio_error 44ed3e2de2Srmindsystem call returns the error status of the asynchronous I/O request 45ed3e2de2Srmindassociated with the structure pointed to by 46ed3e2de2Srmind.Fa aiocbp . 47ed3e2de2Srmind.Sh RETURN VALUES 48ed3e2de2SrmindIf the asynchronous I/O request has completed successfully, 49ed3e2de2Srmind.Fn aio_error 50ed3e2de2Srmindreturns 0. 51ed3e2de2SrmindIf the request has not yet completed, 52ed3e2de2Srmind.Er EINPROGRESS 53ed3e2de2Srmindis returned. 54ed3e2de2SrmindIf the request has completed unsuccessfully the error 55ed3e2de2Srmindstatus is returned as described in 56ed3e2de2Srmind.Xr read 2 , 57ed3e2de2Srmind.Xr write 2 , 58ed3e2de2Srmindor 59ed3e2de2Srmind.Xr fsync 2 . 60ed3e2de2SrmindOn failure, 61ed3e2de2Srmind.Fn aio_error 6290a93c1dSwizreturns \-1 and sets 6390a93c1dSwiz.Va errno 64ed3e2de2Srmindto indicate the error condition. 65ed3e2de2Srmind.Sh ERRORS 66ed3e2de2SrmindThe 67ed3e2de2Srmind.Fn aio_error 68ed3e2de2Srmindsystem call will fail if: 69ed3e2de2Srmind.Bl -tag -width Er 70ed3e2de2Srmind.It Bq Er EINVAL 71ed3e2de2SrmindThe 72ed3e2de2Srmind.Fa aiocb 73ed3e2de2Srmindargument 74ed3e2de2Srminddoes not reference an outstanding asynchronous I/O request. 75ed3e2de2Srmind.El 76ed3e2de2Srmind.Sh SEE ALSO 77ed3e2de2Srmind.Xr fsync 2 , 78ed3e2de2Srmind.Xr read 2 , 79ed3e2de2Srmind.Xr write 2 , 80*e8cfad37Sjruoho.Xr aio 3 81ed3e2de2Srmind.Sh STANDARDS 82ed3e2de2SrmindThe 83ed3e2de2Srmind.Fn aio_error 84ed3e2de2Srmindsystem call 85ed3e2de2Srmindis expected to conform to the 86ed3e2de2Srmind.St -p1003.1-2001 87ed3e2de2Srmindstandard. 88ed3e2de2Srmind.Sh HISTORY 89ed3e2de2SrmindThe 90ed3e2de2Srmind.Fn aio_error 91ed3e2de2Srmindsystem call first appeared in 92ed3e2de2Srmind.Nx 5.0 . 93