Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acancel(2)

areadv(2)

astatus(2)

await(2)

awrite(2)

awritev(2)

listio(2)

aio(5)



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



NAME
     aread - asynchronous read

SYNOPSIS
     #include <sys/aio.h>
     aiohandlet aread(int fildes, struct aiorb *aiorbp);


DESCRIPTION
     aread allows the calling process to read aiorbp->aio_nbytes
     from the file associated with fildes into the buffer pointed
     to by aiorcp->aio_buf.  The function call returns when the
     read request has been initiated or queued to the file or
     device (even when the data cannot be delivered immediately).
     If an error condition is encountered during queuing, the
     function call returns without having initiated or queued the
     request.

RETURNS
     aread returns a handle to the calling process if the func-
     tion is successful, otherwise, the function returns the
     value -1, and sets errno to indicate the error.  The handle
     returned is used for subsequent operations.

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

     [EAGAIN]       The requested asynchronous I/O operation was
                    not queued due to system resource limita-
                    tions.

     [EBADF]        The fildes argument is not a valid file
                    descriptor open for reading.

     [EINVAL]       The aio_whence member is not a proper value,
                    or the resulting file pointer is invalid.

     In the case that aread successfully queues the I/O opera-
     tions but the operation is subsequently cancelled or
     encounters an error, the aio_errno element of the aiocb
     structure contains one of the values normally returned by
     the read system call.  In addition, the following error code
     may be encountered:

     [ECANCEL]      The requested I/O was cancelled before the
                    I/O completed due to an explicit acancel
                    request.

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



                        Printed 11/19/92                   Page 1



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