Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ awrite(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)

await(2)

tev(2)

listio(2)

aio(5)



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



NAME
     awrite - asynchronous write

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


DESCRIPTION
     awrite allows the calling process to write aiorbp-
     >aio_nbytes to the file associated with fildes from the
     buffer pointed to by aiorcp->aio_buf.  The function returns
     when the write 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 returns without having initiated or
     queued the request.

RETURNS
     awrite 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, awrite 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 writing.

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

     In the case that awrite successfully queues the I/O opera-
     tions, but the operation is subsequently canceled 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 canceled before the I/O
                    completed due to an explicit acancel request.

SEE ALSO
     acancel(2), aread(2), areadv(2), astatus(2), await(2), awri-
     tev(2), listio(2), aio(5).




                        Printed 11/19/92                   Page 1



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