*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> aio_results_np (3)              



NAME    [Toc]    [Back]

       aio_results_np  -  Returns  results  for  completed  asynchronous
 I/O operations

SYNOPSIS    [Toc]    [Back]

       #include <aio.h>

       typedef struct aio_completion_data {
                struct aiocb *aio_aiocb;
                ssize_t aio_result;
                int aio_error;

       aio_completion_t;int   aio_results_np(    aio_completion_t
       listchoice="opt">,  int nent, const struct timespec *timeout,
 int howmany);

LIBRARY    [Toc]    [Back]

       Asynchronous I/O Library (libaio, libaio_raw)

PARAMETERS    [Toc]    [Back]

       An array of pointers to asynchronous I/O  completion  data
       structures.   The  number  of  elements in the array. This
       number specifies the number of completed asynchronous  I/O
       operations that can be reported on.   If nent is 0 (zero),
       the function simply returns the number of aio  completions
       not  yet  reported on.  A pointer to a timespec structure.
       If timeout is NULL, the argument is  ignored.  If  howmany
       aio operations are not completed within the timeout value,
       the function fails.  The number  of  aio  operations  that
       must be complete before the the call returns.

DESCRIPTION    [Toc]    [Back]

       The  aio_results_np  function suspends the calling process
       until at least howmany asynchronous  I/O  operations  have
       completed,  until  a  signal  interrupts  the function, or
       until a timeout interval, if specified, has passed.  If at
       the  time  of the call howmany asynchronous I/O operations
       are completed, the  call  returns  the  requested  results
       without suspending the calling process.

       The  list  argument is an array of pointers to aio_completion_t
 data structures.  The nent argument  indicates  the
       number  of  elements  in the array.  On return from a successful
 call, the function return value specifies the number
  of  valid  entries  returned  in the array.  For each
       valid entry, three pieces of information are returned: The
       aio_aiocb  field  contains  a pointer to a completed aiocb
       structure.  The aio_result field contains the return value
       of  the  operation; this value is equivalent to the result
       of a call to aio_return  for  the  aio_aiocb  field.   The
       aio_error field contains the errno value of the operation;
       this value is equivalent  to  the  result  of  a  call  to
       aio_error for the aio_aiocb field.

       Each valid completion structure represents a completed aio
       operation.  The function performs  the  equivalent  of  an
       aio_return  on  each  aiocb on which it reports.  In other
       words, the aiocb pointers returned are ready for immediate
       reuse by the application.

       If  nent is 0 (zero), the function immediately returns the
       number of aio completions not yet reported on.   This  can
       be used to quickly poll for completion.

RETURN VALUES    [Toc]    [Back]

       If  the  function returns successfully, the number of completed
 aio operations reported on is returned.   That  is,
       the  return value is the number of valid entries in in the
       array.  If the value returned is  the  same  as  the  nent
       argument,  more  aio operations may be complete and can be
       reported on by another call to aio_results_np.

       On an unsuccessful call, a value of  -1  is  returned  and
       errno is set to indicate that an error occurred.

ERRORS    [Toc]    [Back]

       The aio_results_np function fails under the following conditions:
 A signal interrupted the  function.   An  invalid
       time  value  was specified in timeout.  The nent parameter
       is negative.  The list paramenter is  null.   The  howmany
       parameter is greater than the nent parameter.

SEE ALSO    [Toc]    [Back]

       Functions:     aio_group_completion_np(3),    aio_read(3),
       aio_suspend(3), aio_write(3), lio_listio(3)

       Guide to Realtime Programming

[ Back ]
 Similar pages
Name OS Title
aio_return Tru64 Returns the status of an asynchronous I/O operation (P1003.1b)
aio_error Tru64 Returns the error status of a specified asynchronous I/O operation (P1003.1b)
lio_listio IRIX linked asynchronous I/O operations
lio_listio HP-UX start a list of asynchronous I/O operations
aio_suspend FreeBSD suspend until asynchronous I/O operations or timeout complete (REALTIME)
aio_listio_max HP-UX the maximum number of POSIX asynchronous I/O operations that can be specified in a listio() call
aio_fsync HP-UX force outstanding asynchronous operations on a file to the synchronized state
DtSearchSetMaxResults HP-UX Set the DtSearch maximum results value
CL_CertAbortQuery Tru64 Terminate a results handle (CDSA)
DtSearchMergeResults HP-UX Merge two DtSearch results lists into one
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service