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