aiowait man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

AIOWAIT(3C)							   AIOWAIT(3C)

       aiowait - wait for completion of asynchronous I/O operation

       #include <sys/asynch.h>
       #include <sys/time.h>

       aio_result_t *aiowait(const struct timeval *timeout);

       The  aiowait()  function	 suspends the calling process until one of its
       outstanding asynchronous I/O operations completes, providing a synchro‐
       nous 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

       The  timeval structure is defined in <sys/time.h> and contains the fol‐
       lowing members:

	 long  tv_sec;		 /* seconds */
	 long  tv_usec;		 /* and microseconds */

       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	 indi‐
       cate the error. aiowait() returns 0 if the time limit expires.

       The aiowait() function will fail if:

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

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

		 There are no outstanding asynchronous I/O requests.

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

       See attributes(5) for descriptions of the following attributes:

       │MT-Level       │ Safe		 │

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

       The aiowait() function is the only way to dequeue an asynchronous noti‐
       fication. 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.

				  Feb 5, 2008			   AIOWAIT(3C)

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net