Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ await(2) — svr3 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acancel(2)

aread(2)

areadv(2)

astatus(2)

awrite(2)

awritev(2)

listio(2)

aio(5)



AWAIT(2-SVR3)       RISC/os Reference Manual        AWAIT(2-SVR3)



NAME
     await - wait for asynchronous I/O request

SYNOPSIS
     #include <sys/aio.h>

     aiohandlet await(aiohandlet aiohandle, struct aiocb *aiocb, int options);


DESCRIPTION
     await suspends the calling process until at least one of the
     asynchronous I/O operations has completed, or until a signal
     interrupts the function.  If any asynchronous I/O operations
     has completed at the time of the call, the function returns
     without suspending the calling process.

     If the aio_handle argument is NULL, the system waits for any
     asynchronous I/O operation to complete.  Otherwise, the
     asynchronous I/O operation indicated by aio_handle is waited
     on.

     The aiocb argument points to an aiocb structure, where the
     completion status of the asynchronous I/O operation should
     be returned.

     If the option argument is set to AIO_NOWAIT, the calling
     process is not suspended even if no asynchronous I/O opera-
     tion has completed.

     sigsuspend can also be used to wait for the I/O completion
     if a signal notification is requested when the asynchronous
     I/O is started.

RETURNS
     If await returns due to an asynchronous I/O completion, the
     handle corresponding to the completed operation is returned.
     The handle is then cleared from the system and is not usable
     for any future operations.

     In cases other than an asynchronous I/O completion, -1 is
     returned, and errno is set to indicate the error.

ERRORS
     If any of the following conditions occur, await returns -1
     and sets errno to the corresponding value:

     [EINVAL]       The handle argument is not a valid asynchro-
                    nous I/O handle.

     [EFAULT]       The aiocb handle points to an inaccessible
                    memory address.




                        Printed 11/19/92                   Page 1





AWAIT(2-SVR3)       RISC/os Reference Manual        AWAIT(2-SVR3)



     [EWOULDBLOCK]  If the option argument is AIO_NOWAIT, no
                    asynchronous I/O has completed.

     [EINTR]        A signal was delivered while waiting for I/O
                    requests to complete.  It is impossible to
                    get this error if the option argument is set
                    to AIO_NOWAIT.

     [ESRCH]        If the handle argument is NULL, there is no
                    outstanding asynchronous I/O pending.

SEE ALSO
     acancel(2), aread(2), areadv(2), astatus(2), awrite(2),
     awritev(2), listio(2), aio(5).









































 Page 2                 Printed 11/19/92



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026