MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                          aiowait(3C)



NAME
     aiowait - wait for completion of asynchronous I/O operation

SYNOPSIS
     #include 
     #include 

     aioresultt *aiowait(const struct timeval *timeout);


DESCRIPTION
     The aiowait() function suspends the  calling  process  until
     one  of  its  outstanding  asynchronous  I/O operations com-
     pletes, providing a synchronous method of notification.


     If timeout is a non-zero pointer,  it  specifies  a  maximum
     interval  to  wait for the completion of an asynchronous I/O
     operation. If timeout is a zero  pointer,  aiowait()  blocks
     indefinitely.   To  effect  a  poll,  the  timeout parameter
     should be non-zero, pointing to a zero-valued timeval struc-
     ture.


     The timeval structure is defined in    and  con-
     tains the following members:

       long  tvsec;           /* seconds */
       long  tvusec;          /* and microseconds */


RETURN VALUES
     Upon successful completion, aiowait() returns a  pointer  to
     the  result  structure  used when the completed asynchronous
     I/O operation was requested. Upon failure, aiowait() returns
     -1 and sets errno to indicate the error. aiowait() returns 0
     if the time limit expires.

ERORS
     The aiowait() function will fail if:

     EFAULT    The timeout argument points to an address  outside
               the  address space of the requesting process.  See
               NOTES.


     EINTR     The execution of aiowait() was  interrupted  by  a
               signal.


     EINVAL    There  are   no   outstanding   asynchronous   I/O
               requests.



SunOS 5.11           Last change: 5 Feb 2008                    1






Standard C Library Functions                          aiowait(3C)



     EINVAL    The  tvsecs  member  of  the  timeval   structure
               pointed  to  by  timeout  is  less  than  0 or the
               tvusecs member is  greater  than  the  number  of
               seconds in a microsecond.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Safe                        
    


SEE ALSO
     aiocancel(3C), aioread(3C), attributes(5)

NOTES
     The aiowait() function is the only way to dequeue  an  asyn-
     chronous  notification. It can be used either inside a SIGIO
     signal handler or in the main program. One SIGIO signal  can
     represent several queued events.


     Passing an illegal address as timeout will result in setting
     errno to EFAULT only if detected by the application process.
























SunOS 5.11           Last change: 5 Feb 2008                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™