1*8269e767SBrooks Davis.\" Copyright (c) 1999 Softweyr LLC. 2*8269e767SBrooks Davis.\" All rights reserved. 3*8269e767SBrooks Davis.\" 4*8269e767SBrooks Davis.\" Redistribution and use in source and binary forms, with or without 5*8269e767SBrooks Davis.\" modification, are permitted provided that the following conditions 6*8269e767SBrooks Davis.\" are met: 7*8269e767SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright 8*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer. 9*8269e767SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright 10*8269e767SBrooks Davis.\" notice, this list of conditions and the following disclaimer in the 11*8269e767SBrooks Davis.\" documentation and/or other materials provided with the distribution. 12*8269e767SBrooks Davis.\" 13*8269e767SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND 14*8269e767SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15*8269e767SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16*8269e767SBrooks Davis.\" ARE DISCLAIMED. IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE 17*8269e767SBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18*8269e767SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19*8269e767SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20*8269e767SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21*8269e767SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22*8269e767SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23*8269e767SBrooks Davis.\" SUCH DAMAGE. 24*8269e767SBrooks Davis.\" 25*8269e767SBrooks Davis.Dd October 23, 2017 26*8269e767SBrooks Davis.Dt AIO_SUSPEND 2 27*8269e767SBrooks Davis.Os 28*8269e767SBrooks Davis.Sh NAME 29*8269e767SBrooks Davis.Nm aio_suspend 30*8269e767SBrooks Davis.Nd suspend until asynchronous I/O operations or timeout complete (REALTIME) 31*8269e767SBrooks Davis.Sh LIBRARY 32*8269e767SBrooks Davis.Lb libc 33*8269e767SBrooks Davis.Sh SYNOPSIS 34*8269e767SBrooks Davis.In aio.h 35*8269e767SBrooks Davis.Ft int 36*8269e767SBrooks Davis.Fn aio_suspend "const struct aiocb *const iocbs[]" "int niocb" "const struct timespec *timeout" 37*8269e767SBrooks Davis.Sh DESCRIPTION 38*8269e767SBrooks DavisThe 39*8269e767SBrooks Davis.Fn aio_suspend 40*8269e767SBrooks Davissystem call suspends the calling process until at least one of the 41*8269e767SBrooks Davisspecified asynchronous I/O requests have completed, a signal is 42*8269e767SBrooks Davisdelivered, or the 43*8269e767SBrooks Davis.Fa timeout 44*8269e767SBrooks Davishas passed. 45*8269e767SBrooks Davis.Pp 46*8269e767SBrooks DavisThe 47*8269e767SBrooks Davis.Fa iocbs 48*8269e767SBrooks Davisargument 49*8269e767SBrooks Davisis an array of 50*8269e767SBrooks Davis.Fa niocb 51*8269e767SBrooks Davispointers to asynchronous I/O requests. 52*8269e767SBrooks DavisArray members containing 53*8269e767SBrooks Davisnull pointers will be silently ignored. 54*8269e767SBrooks Davis.Pp 55*8269e767SBrooks DavisIf 56*8269e767SBrooks Davis.Fa timeout 57*8269e767SBrooks Davisis not a null pointer, it specifies a maximum interval to suspend. 58*8269e767SBrooks DavisIf 59*8269e767SBrooks Davis.Fa timeout 60*8269e767SBrooks Davisis a null pointer, the suspend blocks indefinitely. 61*8269e767SBrooks DavisTo effect a 62*8269e767SBrooks Davispoll, the 63*8269e767SBrooks Davis.Fa timeout 64*8269e767SBrooks Davisshould point to a zero-value timespec structure. 65*8269e767SBrooks Davis.Sh RETURN VALUES 66*8269e767SBrooks DavisIf one or more of the specified asynchronous I/O requests have 67*8269e767SBrooks Daviscompleted, 68*8269e767SBrooks Davis.Fn aio_suspend 69*8269e767SBrooks Davisreturns 0. 70*8269e767SBrooks DavisOtherwise it returns -1 and sets 71*8269e767SBrooks Davis.Va errno 72*8269e767SBrooks Davisto indicate the error, as enumerated below. 73*8269e767SBrooks Davis.Sh ERRORS 74*8269e767SBrooks DavisThe 75*8269e767SBrooks Davis.Fn aio_suspend 76*8269e767SBrooks Davissystem call will fail if: 77*8269e767SBrooks Davis.Bl -tag -width Er 78*8269e767SBrooks Davis.It Bq Er EAGAIN 79*8269e767SBrooks Davisthe 80*8269e767SBrooks Davis.Fa timeout 81*8269e767SBrooks Davisexpired before any I/O requests completed. 82*8269e767SBrooks Davis.It Bq Er EINVAL 83*8269e767SBrooks DavisThe 84*8269e767SBrooks Davis.Fa iocbs 85*8269e767SBrooks Davisargument 86*8269e767SBrooks Daviscontains more asynchronous I/O requests than the 87*8269e767SBrooks Davis.Va vfs.aio.max_aio_queue_per_proc 88*8269e767SBrooks Davis.Xr sysctl 8 89*8269e767SBrooks Davisvariable, or at least one of the requests is not valid. 90*8269e767SBrooks Davis.It Bq Er EINTR 91*8269e767SBrooks Davisthe suspend was interrupted by a signal. 92*8269e767SBrooks Davis.El 93*8269e767SBrooks Davis.Sh SEE ALSO 94*8269e767SBrooks Davis.Xr aio_cancel 2 , 95*8269e767SBrooks Davis.Xr aio_error 2 , 96*8269e767SBrooks Davis.Xr aio_return 2 , 97*8269e767SBrooks Davis.Xr aio_waitcomplete 2 , 98*8269e767SBrooks Davis.Xr aio_write 2 , 99*8269e767SBrooks Davis.Xr aio 4 100*8269e767SBrooks Davis.Sh STANDARDS 101*8269e767SBrooks DavisThe 102*8269e767SBrooks Davis.Fn aio_suspend 103*8269e767SBrooks Davissystem call 104*8269e767SBrooks Davisis expected to conform to the 105*8269e767SBrooks Davis.St -p1003.1 106*8269e767SBrooks Davisstandard. 107*8269e767SBrooks Davis.Sh HISTORY 108*8269e767SBrooks DavisThe 109*8269e767SBrooks Davis.Fn aio_suspend 110*8269e767SBrooks Davissystem call first appeared in 111*8269e767SBrooks Davis.Fx 3.0 . 112*8269e767SBrooks Davis.Sh AUTHORS 113*8269e767SBrooks DavisThis 114*8269e767SBrooks Davismanual page was written by 115*8269e767SBrooks Davis.An Wes Peters Aq Mt wes@softweyr.com . 116