diff options
Diffstat (limited to 'manual/llio.texi')
| -rw-r--r-- | manual/llio.texi | 345 |
1 files changed, 115 insertions, 230 deletions
diff --git a/manual/llio.texi b/manual/llio.texi index 8d18509d45..ba1f455dfd 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -79,9 +79,8 @@ declared in @file{unistd.h}. @pindex unistd.h @pindex fcntl.h -@comment fcntl.h -@comment POSIX.1 @deftypefun int open (const char *@var{filename}, int @var{flags}[, mode_t @var{mode}]) +@standards{POSIX.1, fcntl.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}} The @code{open} function creates and returns a new file descriptor for the file named by @var{filename}. Initially, the file position @@ -166,9 +165,8 @@ The @code{open} function is the underlying primitive for the @code{fopen} and @code{freopen} functions, that create streams. @end deftypefun -@comment fcntl.h -@comment Unix98 @deftypefun int open64 (const char *@var{filename}, int @var{flags}[, mode_t @var{mode}]) +@standards{Unix98, fcntl.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}} This function is similar to @code{open}. It returns a file descriptor which can be used to access the file named by @var{filename}. The only @@ -181,9 +179,8 @@ new, extended API using 64 bit file sizes and offsets transparently replaces the old API. @end deftypefun -@comment fcntl.h -@comment POSIX.1 @deftypefn {Obsolete function} int creat (const char *@var{filename}, mode_t @var{mode}) +@standards{POSIX.1, fcntl.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}} This function is obsolete. The call: @@ -206,9 +203,8 @@ functions to use files up to @twoexp{63} in size and offset from since all of the low-level file handling functions are equally replaced. @end deftypefn -@comment fcntl.h -@comment Unix98 @deftypefn {Obsolete function} int creat64 (const char *@var{filename}, mode_t @var{mode}) +@standards{Unix98, fcntl.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}} This function is similar to @code{creat}. It returns a file descriptor which can be used to access the file named by @var{filename}. The only @@ -224,9 +220,8 @@ new, extended API using 64 bit file sizes and offsets transparently replaces the old API. @end deftypefn -@comment unistd.h -@comment POSIX.1 @deftypefun int close (int @var{filedes}) +@standards{POSIX.1, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{@acsfd{}}} The function @code{close} closes the file descriptor @var{filedes}. Closing a file has the following consequences: @@ -297,18 +292,16 @@ output operations on file descriptors: @code{read}, @code{write}, and @file{unistd.h}. @pindex unistd.h -@comment unistd.h -@comment POSIX.1 @deftp {Data Type} ssize_t +@standards{POSIX.1, unistd.h} This data type is used to represent the sizes of blocks that can be read or written in a single operation. It is similar to @code{size_t}, but must be a signed type. @end deftp @cindex reading from a file descriptor -@comment unistd.h -@comment POSIX.1 @deftypefun ssize_t read (int @var{filedes}, void *@var{buffer}, size_t @var{size}) +@standards{POSIX.1, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{read} function reads up to @var{size} bytes from the file with descriptor @var{filedes}, storing the results in the @var{buffer}. @@ -402,9 +395,8 @@ The @code{read} function is the underlying primitive for all of the functions that read from streams, such as @code{fgetc}. @end deftypefun -@comment unistd.h -@comment Unix98 @deftypefun ssize_t pread (int @var{filedes}, void *@var{buffer}, size_t @var{size}, off_t @var{offset}) +@standards{Unix98, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is usually a safe syscall. The sysdeps/posix fallback emulation @c is not MT-Safe because it uses lseek, read and lseek back, but is it @@ -441,9 +433,8 @@ The function is an extension defined in the Unix Single Specification version 2. @end deftypefun -@comment unistd.h -@comment Unix98 @deftypefun ssize_t pread64 (int @var{filedes}, void *@var{buffer}, size_t @var{size}, off64_t @var{offset}) +@standards{Unix98, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is usually a safe syscall. The sysdeps/posix fallback emulation @c is not MT-Safe because it uses lseek64, read and lseek64 back, but is @@ -462,9 +453,8 @@ When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a @end deftypefun @cindex writing to a file descriptor -@comment unistd.h -@comment POSIX.1 @deftypefun ssize_t write (int @var{filedes}, const void *@var{buffer}, size_t @var{size}) +@standards{POSIX.1, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c Some say write is thread-unsafe on Linux without O_APPEND. In the VFS layer @c the vfs_write() does no locking around the acquisition of a file offset and @@ -603,9 +593,8 @@ The @code{write} function is the underlying primitive for all of the functions that write to streams, such as @code{fputc}. @end deftypefun -@comment unistd.h -@comment Unix98 @deftypefun ssize_t pwrite (int @var{filedes}, const void *@var{buffer}, size_t @var{size}, off_t @var{offset}) +@standards{Unix98, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is usually a safe syscall. The sysdeps/posix fallback emulation @c is not MT-Safe because it uses lseek, write and lseek back, but is it @@ -646,9 +635,8 @@ The function is an extension defined in the Unix Single Specification version 2. @end deftypefun -@comment unistd.h -@comment Unix98 @deftypefun ssize_t pwrite64 (int @var{filedes}, const void *@var{buffer}, size_t @var{size}, off64_t @var{offset}) +@standards{Unix98, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is usually a safe syscall. The sysdeps/posix fallback emulation @c is not MT-Safe because it uses lseek64, write and lseek64 back, but @@ -666,9 +654,8 @@ When the source file is compiled using @code{_FILE_OFFSET_BITS == 64} on a @code{pwrite} and so transparently replaces the 32 bit interface. @end deftypefun -@comment sys/uio.h -@comment BSD @deftypefun ssize_t preadv (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off_t @var{offset}) +@standards{BSD, sys/uio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux 3.2 for all architectures but microblaze @c (which was added on 3.15). The sysdeps/posix fallback emulation @@ -691,9 +678,8 @@ indicating end-of-file, or @math{-1} indicating an error. The possible errors are the same as in @code{readv} and @code{pread}. @end deftypefun -@comment unistd.h -@comment BSD @deftypefun ssize_t preadv64 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off64_t @var{offset}) +@standards{BSD, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux 3.2 for all architectures but microblaze @c (which was added on 3.15). The sysdeps/posix fallback emulation @@ -713,9 +699,8 @@ When the source file is compiled using @code{_FILE_OFFSET_BITS == 64} on a @code{preadv} and so transparently replaces the 32 bit interface. @end deftypefun -@comment sys/uio.h -@comment BSD @deftypefun ssize_t pwritev (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off_t @var{offset}) +@standards{BSD, sys/uio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux 3.2 for all architectures but microblaze @c (which was added on 3.15). The sysdeps/posix fallback emulation @@ -742,9 +727,8 @@ indicating end-of-file, or @math{-1} indicating an error. The possible errors are the same as in @code{writev} and @code{pwrite}. @end deftypefun -@comment unistd.h -@comment BSD @deftypefun ssize_t pwritev64 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off64_t @var{offset}) +@standards{BSD, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux 3.2 for all architectures but microblaze @c (which was added on 3.15). The sysdeps/posix fallback emulation @@ -764,9 +748,8 @@ When the source file is compiled using @code{_FILE_OFFSET_BITS == 64} on a @code{pwritev} and so transparently replaces the 32 bit interface. @end deftypefun -@comment sys/uio.h -@comment GNU @deftypefun ssize_t preadv2 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off_t @var{offset}, int @var{flags}) +@standards{GNU, sys/uio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux v4.6. The sysdeps/posix fallback emulation @c is also MT-Safe since it calls preadv. @@ -810,9 +793,8 @@ An unsupported @var{flags} was used. @end deftypefun -@comment unistd.h -@comment GNU @deftypefun ssize_t preadv64v2 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off64_t @var{offset}, int @var{flags}) +@standards{GNU, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux v4.6. The sysdeps/posix fallback emulation @c is also MT-Safe since it calls preadv. @@ -831,9 +813,8 @@ When the source file is compiled using @code{_FILE_OFFSET_BITS == 64} on a @end deftypefun -@comment sys/uio.h -@comment GNU @deftypefun ssize_t pwritev2 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off_t @var{offset}, int @var{flags}) +@standards{GNU, sys/uio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux v4.6. The sysdeps/posix fallback emulation @c is also MT-Safe since it calls pwritev. @@ -853,9 +834,8 @@ indicating end-of-file, or @math{-1} indicating an error. The possible errors are the same as in @code{preadv2}. @end deftypefun -@comment unistd.h -@comment GNU @deftypefun ssize_t pwritev64v2 (int @var{fd}, const struct iovec *@var{iov}, int @var{iovcnt}, off64_t @var{offset}, int @var{flags}) +@standards{GNU, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c This is a syscall for Linux v4.6. The sysdeps/posix fallback emulation @c is also MT-Safe since it calls pwritev. @@ -889,9 +869,8 @@ To read the current file position value from a descriptor, use @cindex file positioning on a file descriptor @cindex positioning a file descriptor @cindex seeking on a file descriptor -@comment unistd.h -@comment POSIX.1 @deftypefun off_t lseek (int @var{filedes}, off_t @var{offset}, int @var{whence}) +@standards{POSIX.1, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{lseek} function is used to change the file position of the file with descriptor @var{filedes}. @@ -979,9 +958,8 @@ The @code{lseek} function is the underlying primitive for the descriptors. @end deftypefun -@comment unistd.h -@comment Unix98 @deftypefun off64_t lseek64 (int @var{filedes}, off64_t @var{offset}, int @var{whence}) +@standards{Unix98, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function is similar to the @code{lseek} function. The difference is that the @var{offset} parameter is of type @code{off64_t} instead of @@ -1043,9 +1021,8 @@ will read four characters starting with the 1024'th character of @file{foo}, and then four more characters starting with the 1028'th character. -@comment sys/types.h -@comment POSIX.1 @deftp {Data Type} off_t +@standards{POSIX.1, sys/types.h} This is a signed integer type used to represent file sizes. In @theglibc{}, this type is no narrower than @code{int}. @@ -1053,9 +1030,8 @@ If the source is compiled with @code{_FILE_OFFSET_BITS == 64} this type is transparently replaced by @code{off64_t}. @end deftp -@comment sys/types.h -@comment Unix98 @deftp {Data Type} off64_t +@standards{Unix98, sys/types.h} This type is used similar to @code{off_t}. The difference is that even on 32 bit machines, where the @code{off_t} type would have 32 bits, @code{off64_t} has 64 bits and so is able to address files up to @@ -1092,9 +1068,8 @@ an existing stream with the @code{fileno} function. These functions are declared in the header file @file{stdio.h}. @pindex stdio.h -@comment stdio.h -@comment POSIX.1 @deftypefun {FILE *} fdopen (int @var{filedes}, const char *@var{opentype}) +@standards{POSIX.1, stdio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @aculock{}}} The @code{fdopen} function returns a new stream for the file descriptor @var{filedes}. @@ -1121,9 +1096,8 @@ for file descriptors do not permit the access specified by For an example showing the use of the @code{fdopen} function, see @ref{Creating a Pipe}. -@comment stdio.h -@comment POSIX.1 @deftypefun int fileno (FILE *@var{stream}) +@standards{POSIX.1, stdio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function returns the file descriptor associated with the stream @var{stream}. If an error is detected (for example, if the @var{stream} @@ -1131,9 +1105,8 @@ is not valid) or if @var{stream} does not do I/O to a file, @code{fileno} returns @math{-1}. @end deftypefun -@comment stdio.h -@comment GNU @deftypefun int fileno_unlocked (FILE *@var{stream}) +@standards{GNU, stdio.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fileno_unlocked} function is equivalent to the @code{fileno} function except that it does not implicitly lock the stream if the state @@ -1150,23 +1123,20 @@ file descriptors belonging to the standard streams @code{stdin}, @pindex unistd.h @vtable @code -@comment unistd.h -@comment POSIX.1 @item STDIN_FILENO +@standards{POSIX.1, unistd.h} This macro has value @code{0}, which is the file descriptor for standard input. @cindex standard input file descriptor -@comment unistd.h -@comment POSIX.1 @item STDOUT_FILENO +@standards{POSIX.1, unistd.h} This macro has value @code{1}, which is the file descriptor for standard output. @cindex standard output file descriptor -@comment unistd.h -@comment POSIX.1 @item STDERR_FILENO +@standards{POSIX.1, unistd.h} This macro has value @code{2}, which is the file descriptor for standard error output. @end vtable @@ -1321,9 +1291,8 @@ primitives, so they are not a portability threat. They are defined in These functions are controlled with arrays of @code{iovec} structures, which describe the location and size of each buffer. -@comment sys/uio.h -@comment BSD @deftp {Data Type} {struct iovec} +@standards{BSD, sys/uio.h} The @code{iovec} structure describes a buffer. It contains two fields: @@ -1338,9 +1307,8 @@ Contains the length of the buffer. @end table @end deftp -@comment sys/uio.h -@comment BSD @deftypefun ssize_t readv (int @var{filedes}, const struct iovec *@var{vector}, int @var{count}) +@standards{BSD, sys/uio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}} @c The fallback sysdeps/posix implementation, used even on GNU/Linux @c with old kernels that lack a full readv/writev implementation, may @@ -1361,9 +1329,8 @@ errors are the same as in @code{read}. @end deftypefun -@comment sys/uio.h -@comment BSD @deftypefun ssize_t writev (int @var{filedes}, const struct iovec *@var{vector}, int @var{count}) +@standards{BSD, sys/uio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}} @c The fallback sysdeps/posix implementation, used even on GNU/Linux @c with old kernels that lack a full readv/writev implementation, may @@ -1426,9 +1393,8 @@ size_t page_size = (size_t) sysconf (_SC_PAGESIZE); @noindent These functions are declared in @file{sys/mman.h}. -@comment sys/mman.h -@comment POSIX @deftypefun {void *} mmap (void *@var{address}, size_t @var{length}, int @var{protect}, int @var{flags}, int @var{filedes}, off_t @var{offset}) +@standards{POSIX, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{mmap} function creates a new mapping, connected to bytes @@ -1546,9 +1512,8 @@ The file is on a filesystem that doesn't support mapping. @end deftypefun -@comment sys/mman.h -@comment LFS @deftypefun {void *} mmap64 (void *@var{address}, size_t @var{length}, int @var{protect}, int @var{flags}, int @var{filedes}, off64_t @var{offset}) +@standards{LFS, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @c The page_shift auto detection when MMAP2_PAGE_SHIFT is -1 (it never @c is) would be thread-unsafe. @@ -1565,9 +1530,8 @@ new, extended API using 64 bit file sizes and offsets transparently replaces the old API. @end deftypefun -@comment sys/mman.h -@comment POSIX @deftypefun int munmap (void *@var{addr}, size_t @var{length}) +@standards{POSIX, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} @code{munmap} removes any memory maps from (@var{addr}) to (@var{addr} + @@ -1592,9 +1556,8 @@ aligned. @end deftypefun -@comment sys/mman.h -@comment POSIX @deftypefun int msync (void *@var{address}, size_t @var{length}, int @var{flags}) +@standards{POSIX, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} When using shared mappings, the kernel can write the file at any time @@ -1640,9 +1603,8 @@ There is no existing mapping in at least part of the given region. @end deftypefun -@comment sys/mman.h -@comment GNU @deftypefun {void *} mremap (void *@var{address}, size_t @var{length}, size_t @var{new_length}, int @var{flag}) +@standards{GNU, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function can be used to change the size of an existing memory @@ -1689,9 +1651,8 @@ not support mapping at all. Thus, programs using @code{mmap} should have a fallback method to use should it fail. @xref{Mmap,,,standards,GNU Coding Standards}. -@comment sys/mman.h -@comment POSIX @deftypefun int madvise (void *@var{addr}, size_t @var{length}, int @var{advice}) +@standards{POSIX, sys/mman.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} This function can be used to provide the system with @var{advice} about @@ -1759,9 +1720,8 @@ There is no existing mapping in at least part of the given region. @end table @end deftypefun -@comment sys/mman.h -@comment POSIX @deftypefn Function int shm_open (const char *@var{name}, int @var{oflag}, mode_t @var{mode}) +@standards{POSIX, sys/mman.h} @safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@asuinit{} @ascuheap{} @asulock{}}@acunsafe{@aculock{} @acsmem{} @acsfd{}}} @c shm_open @mtslocale @asuinit @ascuheap @asulock @aculock @acsmem @acsfd @c libc_once(where_is_shmfs) @mtslocale @asuinit @ascuheap @asulock @aculock @acsmem @acsfd @@ -1848,16 +1808,14 @@ The file descriptor sets for the @code{select} function are specified as @code{fd_set} objects. Here is the description of the data type and some macros for manipulating these objects. -@comment sys/types.h -@comment BSD @deftp {Data Type} fd_set +@standards{BSD, sys/types.h} The @code{fd_set} data type represents file descriptor sets for the @code{select} function. It is actually a bit array. @end deftp -@comment sys/types.h -@comment BSD @deftypevr Macro int FD_SETSIZE +@standards{BSD, sys/types.h} The value of this macro is the maximum number of file descriptors that a @code{fd_set} object can hold information about. On systems with a fixed maximum number, @code{FD_SETSIZE} is at least that number. On @@ -1868,17 +1826,15 @@ descriptor with a value as high as @code{FD_SETSIZE}, you cannot put that descriptor into an @code{fd_set}. @end deftypevr -@comment sys/types.h -@comment BSD @deftypefn Macro void FD_ZERO (fd_set *@var{set}) +@standards{BSD, sys/types.h} @safety{@prelim{}@mtsafe{@mtsrace{:set}}@assafe{}@acsafe{}} This macro initializes the file descriptor set @var{set} to be the empty set. @end deftypefn -@comment sys/types.h -@comment BSD @deftypefn Macro void FD_SET (int @var{filedes}, fd_set *@var{set}) +@standards{BSD, sys/types.h} @safety{@prelim{}@mtsafe{@mtsrace{:set}}@assafe{}@acsafe{}} @c Setting a bit isn't necessarily atomic, so there's a potential race @c here if set is not used exclusively. @@ -1888,9 +1844,8 @@ The @var{filedes} parameter must not have side effects since it is evaluated more than once. @end deftypefn -@comment sys/types.h -@comment BSD @deftypefn Macro void FD_CLR (int @var{filedes}, fd_set *@var{set}) +@standards{BSD, sys/types.h} @safety{@prelim{}@mtsafe{@mtsrace{:set}}@assafe{}@acsafe{}} @c Setting a bit isn't necessarily atomic, so there's a potential race @c here if set is not used exclusively. @@ -1900,9 +1855,8 @@ The @var{filedes} parameter must not have side effects since it is evaluated more than once. @end deftypefn -@comment sys/types.h -@comment BSD @deftypefn Macro int FD_ISSET (int @var{filedes}, const fd_set *@var{set}) +@standards{BSD, sys/types.h} @safety{@prelim{}@mtsafe{@mtsrace{:set}}@assafe{}@acsafe{}} This macro returns a nonzero value (true) if @var{filedes} is a member of the file descriptor set @var{set}, and zero (false) otherwise. @@ -1913,9 +1867,8 @@ evaluated more than once. Next, here is the description of the @code{select} function itself. -@comment sys/types.h -@comment BSD @deftypefun int select (int @var{nfds}, fd_set *@var{read-fds}, fd_set *@var{write-fds}, fd_set *@var{except-fds}, struct timeval *@var{timeout}) +@standards{BSD, sys/types.h} @safety{@prelim{}@mtsafe{@mtsrace{:read-fds} @mtsrace{:write-fds} @mtsrace{:except-fds}}@assafe{}@acsafe{}} @c The select syscall is preferred, but pselect6 may be used instead, @c which requires converting timeout to a timespec and back. The @@ -2019,9 +1972,8 @@ In situations where synchronization points are necessary, you can use special functions which ensure that all operations finish before they return. -@comment unistd.h -@comment X/Open @deftypefun void sync (void) +@standards{X/Open, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} A call to this function will not return as long as there is data which has not been written to the device. All dirty buffers in the kernel will @@ -2035,9 +1987,8 @@ Programs more often want to ensure that data written to a given file is committed, rather than all data in the system. For this, @code{sync} is overkill. -@comment unistd.h -@comment POSIX @deftypefun int fsync (int @var{fildes}) +@standards{POSIX, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} The @code{fsync} function can be used to make sure all data associated with the open file @var{fildes} is written to the device associated with the @@ -2073,9 +2024,8 @@ Meta-information, like the modification time etc., are not that important and leaving such information uncommitted does not prevent a successful recovery of the file in case of a problem. -@comment unistd.h -@comment POSIX @deftypefun int fdatasync (int @var{fildes}) +@standards{POSIX, unistd.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} When a call to the @code{fdatasync} function returns, it is ensured that all of the file data is written to the device. For all pending I/O @@ -2124,9 +2074,8 @@ asynchronous I/O operations are controlled using a data structure named @code{struct aiocb} (@dfn{AIO control block}). It is defined in @file{aio.h} as follows. -@comment aio.h -@comment POSIX.1b @deftp {Data Type} {struct aiocb} +@standards{POSIX.1b, aio.h} The POSIX.1b standard mandates that the @code{struct aiocb} structure contains at least the members described in the following table. There might be more elements which are used by the implementation, but @@ -2207,9 +2156,8 @@ defined which replaces the types of the appropriate members with larger types but otherwise is equivalent to @code{struct aiocb}. Particularly, all member names are the same. -@comment aio.h -@comment POSIX.1b @deftp {Data Type} {struct aiocb64} +@standards{POSIX.1b, aio.h} @table @code @item int aio_fildes This element specifies the file descriptor which is used for the @@ -2275,9 +2223,8 @@ aiocb64}, since the LFS transparently replaces the old interface. @node Asynchronous Reads/Writes @subsection Asynchronous Read and Write Operations -@comment aio.h -@comment POSIX.1b @deftypefun int aio_read (struct aiocb *@var{aiocbp}) +@standards{POSIX.1b, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{} @ascuheap{}}@acunsafe{@aculock{} @acsmem{}}} @c Calls aio_enqueue_request. @c aio_enqueue_request @asulock @ascuheap @aculock @acsmem @@ -2492,9 +2439,8 @@ function is in fact @code{aio_read64} since the LFS interface transparently replaces the normal implementation. @end deftypefun -@comment aio.h -@comment Unix98 @deftypefun int aio_read64 (struct aiocb64 *@var{aiocbp}) +@standards{Unix98, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{} @ascuheap{}}@acunsafe{@aculock{} @acsmem{}}} This function is similar to the @code{aio_read} function. The only difference is that on @w{32 bit} machines, the file descriptor should @@ -2511,9 +2457,8 @@ replaces the interface for small files on 32 bit machines. To write data asynchronously to a file, there exists an equivalent pair of functions with a very similar interface. -@comment aio.h -@comment POSIX.1b @deftypefun int aio_write (struct aiocb *@var{aiocbp}) +@standards{POSIX.1b, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{} @ascuheap{}}@acunsafe{@aculock{} @acsmem{}}} This function initiates an asynchronous write operation. The function call immediately returns after the operation was enqueued or if before @@ -2578,9 +2523,8 @@ function is in fact @code{aio_write64} since the LFS interface transparently replaces the normal implementation. @end deftypefun -@comment aio.h -@comment Unix98 @deftypefun int aio_write64 (struct aiocb64 *@var{aiocbp}) +@standards{Unix98, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{} @ascuheap{}}@acunsafe{@aculock{} @acsmem{}}} This function is similar to the @code{aio_write} function. The only difference is that on @w{32 bit} machines the file descriptor should @@ -2600,9 +2544,8 @@ operation at a time, and which can handle freely mixed read and write operations. It is therefore similar to a combination of @code{readv} and @code{writev}. -@comment aio.h -@comment POSIX.1b @deftypefun int lio_listio (int @var{mode}, struct aiocb *const @var{list}[], int @var{nent}, struct sigevent *@var{sig}) +@standards{POSIX.1b, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@asulock{} @ascuheap{}}@acunsafe{@aculock{} @acsmem{}}} @c Call lio_listio_internal, that takes the aio_requests_mutex lock and @c enqueues each request. Then, it waits for notification or prepares @@ -2689,9 +2632,8 @@ function is in fact @code{lio_listio64} since the LFS interface transparently replaces the normal implementation. @end deftypefun -@comment aio.h -@comment Unix98 @deftypefun int lio_listio64 (int @var{mode}, struct aiocb64 *const @var{list}[], int @var{nent}, struct sigevent *@var{sig}) +@standards{Unix98, aio.h} @safety{@prelim{}@mtsafe{}@asunsafe{@as |
