Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/lib/ape/man/3/aio_suspend

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "AIO_SUSPEND" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" aio_suspend 
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.SH NAME
aio_suspend \- wait for an asynchronous I/O request (\fBREALTIME\fP)
.SH SYNOPSIS
.LP
\fB#include <aio.h>
.br
.sp
int aio_suspend(const struct aiocb * const\fP \fIlist\fP\fB[], int\fP
\fInent\fP\fB,
.br
\ \ \ \ \ \  const struct timespec *\fP\fItimeout\fP\fB); \fP
\fB
.br
\fP
.SH DESCRIPTION
.LP
The \fIaio_suspend\fP() function shall suspend the calling thread
until at least one of the asynchronous I/O operations
referenced by the \fIlist\fP argument has completed, until a signal
interrupts the function, or, if \fItimeout\fP is not NULL,
until the time interval specified by \fItimeout\fP has passed. If
any of the \fBaiocb\fP structures in the list correspond to
completed asynchronous I/O operations (that is, the error status for
the operation is not equal to [EINPROGRESS]) at the time of
the call, the function shall return without suspending the calling
thread. The \fIlist\fP argument is an array of pointers to
asynchronous I/O control blocks. The \fInent\fP argument indicates
the number of elements in the array. Each \fBaiocb\fP
structure pointed to has been used in initiating an asynchronous I/O
request via \fIaio_read\fP(), \fIaio_write\fP(), or \fIlio_listio\fP().
This array may contain NULL pointers, which are ignored. If this array
contains pointers that refer to \fBaiocb\fP structures that have not
been used in submitting asynchronous I/O, the effect is
undefined.
.LP
If the time interval indicated in the \fBtimespec\fP structure pointed
to by \fItimeout\fP passes before any of the I/O
operations referenced by \fIlist\fP are completed, then \fIaio_suspend\fP()
shall return with an error.  If the
Monotonic Clock option is supported, the clock that shall be used
to measure this time interval shall be the CLOCK_MONOTONIC clock.
.SH RETURN VALUE
.LP
If the \fIaio_suspend\fP() function returns after one or more asynchronous
I/O operations have completed, the function shall
return zero. Otherwise, the function shall return a value of -1 and
set \fIerrno\fP to indicate the error.
.LP
The application may determine which asynchronous I/O completed by
scanning the associated error and return status using \fIaio_error\fP()
and \fIaio_return\fP(),
respectively.
.SH ERRORS
.LP
The \fIaio_suspend\fP() function shall fail if:
.TP 7
.B EAGAIN
No asynchronous I/O indicated in the list referenced by \fIlist\fP
completed in the time interval indicated by
\fItimeout\fP.
.TP 7
.B EINTR
A signal interrupted the \fIaio_suspend\fP() function. Note that,
since each asynchronous I/O operation may possibly provoke a
signal when it completes, this error return may be caused by the completion
of one (or more) of the very I/O operations being
awaited.
.sp
.LP
\fIThe following sections are informative.\fP
.SH EXAMPLES
.LP
None.
.SH APPLICATION USAGE
.LP
The \fIaio_suspend\fP() function is part of the Asynchronous Input
and Output option and need not be available on all
implementations.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIaio_read\fP(), \fIaio_write\fP(), \fIlio_listio\fP(), the Base
Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<aio.h>\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.