aio_read man page on Archlinux

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

AIO_READ(3P)		   POSIX Programmer's Manual		  AIO_READ(3P)

       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
       implementation of this interface may differ (consult the	 corresponding
       Linux  manual page for details of Linux behavior), or the interface may
       not be implemented on Linux.

       aio_read — asynchronous read from a file

       #include <aio.h>

       int aio_read(struct aiocb *aiocbp);

       The aio_read() function shall read  aiocbp->aio_nbytes  from  the  file
       associated  with	 aiocbp->aio_fildes  into  the	buffer	pointed	 to by
       aiocbp->aio_buf. The function call shall return when the	 read  request
       has  been initiated or queued to the file or device (even when the data
       cannot be delivered immediately).

       If prioritized I/O is supported for this file,  then  the  asynchronous
       operation  shall	 be submitted at a priority equal to a base scheduling
       priority minus aiocbp->aio_reqprio. If Thread Execution	Scheduling  is
       not supported, then the base scheduling priority is that of the calling
       otherwise, the base scheduling priority is that of the calling thread.

       The aiocbp value	 may  be  used	as  an	argument  to  aio_error()  and
       aio_return()  in order to determine the error status and return status,
       respectively, of the asynchronous operation while it is proceeding.  If
       an  error  condition  is	 encountered during queuing, the function call
       shall return without  having  initiated	or  queued  the	 request.  The
       requested operation takes place at the absolute position in the file as
       given by aio_offset, as if lseek() were called immediately prior to the
       operation  with	an  offset  equal  to aio_offset and a whence equal to
       SEEK_SET.  After a successful call to enqueue an asynchronous I/O oper‐
       ation, the value of the file offset for the file is unspecified.

       The  aio_sigevent  member  specifies the notification which occurs when
       the request is completed.

       The aiocbp->aio_lio_opcode field shall be ignored by aio_read().

       The aiocbp argument points to an aiocb structure. If the buffer pointed
       to by aiocbp->aio_buf or the control block pointed to by aiocbp becomes
       an illegal address prior	 to  asynchronous  I/O	completion,  then  the
       behavior is undefined.

       Simultaneous  asynchronous  operations  using  the  same aiocbp produce
       undefined results.

       If  synchronized	 I/O  is  enabled  on	the   file   associated	  with
       aiocbp->aio_fildes, the behavior of this function shall be according to
       the definitions of synchronized I/O data integrity completion and  syn‐
       chronized I/O file integrity completion.

       For  any	 system	 action that changes the process memory space while an
       asynchronous I/O is outstanding to the address range being changed, the
       result of that action is undefined.

       For regular files, no data transfer shall occur past the offset maximum
       established   in	  the	open   file   description   associated	  with

       The  aio_read()	function shall return the value zero if the I/O opera‐
       tion is successfully queued; otherwise, the function shall  return  the
       value −1 and set errno to indicate the error.

       The aio_read() function shall fail if:

       EAGAIN The  requested  asynchronous I/O operation was not queued due to
	      system resource limitations.

       Each of the following conditions may be detected synchronously  at  the
       time of the call to aio_read(), or asynchronously. If any of the condi‐
       tions below are detected synchronously, the aio_read()  function	 shall
       return  −1 and set errno to the corresponding value. If any of the con‐
       ditions below are detected asynchronously, the  return  status  of  the
       asynchronous  operation is set to −1, and the error status of the asyn‐
       chronous operation is set to the corresponding value.

       EBADF  The aiocbp->aio_fildes argument is not a valid  file  descriptor
	      open for reading.

       EINVAL The  file	 offset	 value	implied by aiocbp->aio_offset would be
	      aiocbp->aio_reqprio is not a valid value, or  aiocbp->aio_nbytes
	      is an invalid value.

       In  the	case that the aio_read() successfully queues the I/O operation
       but the operation is subsequently canceled or encounters an error,  the
       return  status  of the asynchronous operation is one of the values nor‐
       mally returned by the read() function call. In addition, the error sta‐
       tus  of	the asynchronous operation is set to one of the error statuses
       normally set by the read() function call, or one of the following  val‐

       EBADF  The  aiocbp->aio_fildes  argument is not a valid file descriptor
	      open for reading.

	      The requested I/O was canceled before the I/O completed  due  to
	      an explicit aio_cancel() request.

       EINVAL The  file	 offset	 value	implied by aiocbp->aio_offset would be

       The  following  condition  may  be  detected  synchronously  or	 asyn‐

	      The  file	 is a regular file, aiobcp->aio_nbytes is greater than
	      0, and the starting offset in aiobcp->aio_offset is  before  the
	      end-of-file  and	is at or beyond the offset maximum in the open
	      file description associated with aiocbp->aio_fildes.

       The following sections are informative.





       aio_cancel(),  aio_error(),  lio_listio(),  aio_return(),  aio_write(),
       close(), exec, exit(), fork(), lseek(), read()

       The Base Definitions volume of POSIX.1‐2008, <aio.h>

       Portions	 of  this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       --  Portable  Operating	System	Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
       cal  and	 Electronics  Engineers,  Inc  and  The	 Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum	 1  applied.)  In  the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group  Standard
       is  the	referee document. The original Standard can be obtained online
       at .

       Any typographical or formatting errors that appear  in  this  page  are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors,	 see  https://www.ker‐ .

IEEE/The Open Group		     2013			  AIO_READ(3P)

List of man pages available for Archlinux

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