From 1b05464954073b2a6f95f7b7d50e90c8a1ec4785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=A7al=20Comajoan=20Cara?= Date: Wed, 21 Nov 2018 20:32:05 +0100 Subject: 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. --- posix-users/input_and_output.rst | 84 ++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 28 deletions(-) (limited to 'posix-users') diff --git a/posix-users/input_and_output.rst b/posix-users/input_and_output.rst index 5a3b9d8..b6f2a57 100644 --- a/posix-users/input_and_output.rst +++ b/posix-users/input_and_output.rst @@ -88,7 +88,9 @@ pipe - Create an Inter-Process Channel .. code-block:: c + #include int pipe( + int fildes[2] ); **STATUS CODES:** @@ -237,10 +239,10 @@ read - Reads from a file .. code-block:: c #include - int read( - int fildes, - void *buf, - unsigned int nbyte + ssize_t read( + int fildes, + void *buf, + size_t nbyte ); **STATUS CODES:** @@ -313,10 +315,10 @@ write - Writes to a file .. code-block:: c #include - int write( - int fildes, - const void *buf, - unsigned int nbytes + ssize_t write( + int fildes, + const void *buf, + size_t nbyte ); **STATUS CODES:** @@ -370,12 +372,11 @@ fcntl - Manipulates an open file descriptor .. code-block:: c - #include #include - #include int fcntl( int fildes, - int cmd + int cmd, + ... ); **STATUS CODES:** @@ -469,12 +470,11 @@ lseek - Reposition read/write file offset .. code-block:: c - #include #include - int lseek( - int fildes, - off_t offset, - int whence + off_t lseek( + int fildes, + off_t offset, + int whence ); **STATUS CODES:** @@ -527,8 +527,9 @@ fsync - Synchronize file complete in-core state with that on disk .. code-block:: c + #include 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 int fdatasync( - int fd + int fildes ); **STATUS CODES:** @@ -620,7 +622,10 @@ sync - Schedule file system updates .. code-block:: c - void sync(void); + #include + void sync( + void + ); **STATUS CODES:** @@ -650,10 +655,10 @@ mount - Mount a file system #include int mount( rtems_filesystem_mount_table_entry_t **mt_entry, - rtems_filesystem_operations_table *fs_ops, - rtems_filesystem_options_t fsoptions, - char *device, - char *mount_point + rtems_filesystem_operations_table *fs_ops, + rtems_filesystem_options_t fsoptions, + char *device, + char *mount_point ); **STATUS CODES:** @@ -717,9 +722,9 @@ readv - Vectored read from a file #include ssize_t readv( - int fd, + int fildes, const struct iovec *iov, - int iovcnt + int iovcnt ); **STATUS CODES:** @@ -766,9 +771,9 @@ writev - Vectored write to a file #include ssize_t writev( - int fd, + int fildes, const struct iovec *iov, - int iovcnt + int iovcnt ); **STATUS CODES:** @@ -818,7 +823,9 @@ aio_read - Asynchronous Read .. code-block:: c + #include int aio_read( + struct aiocb *aiocbp ); **STATUS CODES:** @@ -847,7 +854,9 @@ aio_write - Asynchronous Write .. code-block:: c + #include int aio_write( + struct aiocb *aiocbp ); **STATUS CODES:** @@ -876,7 +885,12 @@ lio_listio - List Directed I/O .. code-block:: c + #include 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 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 + ssize_t aio_return( + struct aiocb *aiocbp ); **STATUS CODES:** @@ -963,7 +981,10 @@ aio_cancel - Cancel Asynchronous I/O Request .. code-block:: c + #include 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 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 int aio_fsync( + int op, + struct aiocb *aiocbp ); **STATUS CODES:** -- cgit v1.2.3