posix-users/input_and_output.rst: Add Prototypes

Add and update Prototypes to Input and Output APIs in
POSIX Users Guide.

This work was part of GCI 2018.
This commit is contained in:
Marçal Comajoan Cara 2018-11-21 20:32:05 +01:00 committed by Joel Sherrill
parent 083f3584d3
commit 1b05464954

View File

@ -88,7 +88,9 @@ pipe - Create an Inter-Process Channel
.. code-block:: c
#include <unistd.h>
int pipe(
int fildes[2]
);
**STATUS CODES:**
@ -237,10 +239,10 @@ read - Reads from a file
.. code-block:: c
#include <unistd.h>
int read(
ssize_t read(
int fildes,
void *buf,
unsigned int nbyte
size_t nbyte
);
**STATUS CODES:**
@ -313,10 +315,10 @@ write - Writes to a file
.. code-block:: c
#include <unistd.h>
int write(
ssize_t write(
int fildes,
const void *buf,
unsigned int nbytes
size_t nbyte
);
**STATUS CODES:**
@ -370,12 +372,11 @@ fcntl - Manipulates an open file descriptor
.. code-block:: c
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
int fcntl(
int fildes,
int cmd
int cmd,
...
);
**STATUS CODES:**
@ -469,9 +470,8 @@ lseek - Reposition read/write file offset
.. code-block:: c
#include <sys/types.h>
#include <unistd.h>
int lseek(
off_t lseek(
int fildes,
off_t offset,
int whence
@ -527,8 +527,9 @@ fsync - Synchronize file complete in-core state with that on disk
.. code-block:: c
#include <unistd.h>
int fsync(
int fd
int fildes
);
**STATUS CODES:**
@ -569,8 +570,9 @@ fdatasync - Synchronize file in-core data with that on disk
.. code-block:: c
#include <unistd.h>
int fdatasync(
int fd
int fildes
);
**STATUS CODES:**
@ -620,7 +622,10 @@ sync - Schedule file system updates
.. code-block:: c
void sync(void);
#include <unistd.h>
void sync(
void
);
**STATUS CODES:**
@ -717,7 +722,7 @@ readv - Vectored read from a file
#include <sys/uio.h>
ssize_t readv(
int fd,
int fildes,
const struct iovec *iov,
int iovcnt
);
@ -766,7 +771,7 @@ writev - Vectored write to a file
#include <sys/uio.h>
ssize_t writev(
int fd,
int fildes,
const struct iovec *iov,
int iovcnt
);
@ -818,7 +823,9 @@ aio_read - Asynchronous Read
.. code-block:: c
#include <aio.h>
int aio_read(
struct aiocb *aiocbp
);
**STATUS CODES:**
@ -847,7 +854,9 @@ aio_write - Asynchronous Write
.. code-block:: c
#include <aio.h>
int aio_write(
struct aiocb *aiocbp
);
**STATUS CODES:**
@ -876,7 +885,12 @@ lio_listio - List Directed I/O
.. code-block:: c
#include <aio.h>
int lio_listio(
int mode,
struct aiocb *restrict const list[restrict],
int nent,
struct sigevent *restrict sig
);
**STATUS CODES:**
@ -905,7 +919,9 @@ aio_error - Retrieve Error Status of Asynchronous I/O Operation
.. code-block:: c
#include <aio.h>
int aio_error(
const struct aiocb *aiocbp
);
**STATUS CODES:**
@ -934,7 +950,9 @@ aio_return - Retrieve Return Status Asynchronous I/O Operation
.. code-block:: c
int aio_return(
#include <aio.h>
ssize_t aio_return(
struct aiocb *aiocbp
);
**STATUS CODES:**
@ -963,7 +981,10 @@ aio_cancel - Cancel Asynchronous I/O Request
.. code-block:: c
#include <aio.h>
int aio_cancel(
int fildes,
struct aiocb *aiocbp
);
**STATUS CODES:**
@ -992,7 +1013,11 @@ aio_suspend - Wait for Asynchronous I/O Request
.. code-block:: c
#include <aio.h>
int aio_suspend(
const struct aiocb *const list[],
int nent,
const struct timespec *timeout
);
**STATUS CODES:**
@ -1021,7 +1046,10 @@ aio_fsync - Asynchronous File Synchronization
.. code-block:: c
#include <aio.h>
int aio_fsync(
int op,
struct aiocb *aiocbp
);
**STATUS CODES:**