[2d19ed6c] | 1 | @c |
---|
| 2 | @c COPYRIGHT (c) 1988-1998. |
---|
| 3 | @c On-Line Applications Research Corporation (OAR). |
---|
| 4 | @c All rights reserved. |
---|
| 5 | @c |
---|
| 6 | @c $Id$ |
---|
| 7 | @c |
---|
| 8 | |
---|
| 9 | @chapter Input and Output Primitives |
---|
[0874502] | 10 | |
---|
[2d19ed6c] | 11 | @section Pipes |
---|
[0874502] | 12 | |
---|
[2d19ed6c] | 13 | @subsection Create an Inter-Process Channel |
---|
[0874502] | 14 | |
---|
| 15 | @example |
---|
[5f4c109] | 16 | pipe(), Function, Dummy Implementation |
---|
[0874502] | 17 | @end example |
---|
| 18 | |
---|
[2d19ed6c] | 19 | @section File Descriptor Manipulation |
---|
[0874502] | 20 | |
---|
[2d19ed6c] | 21 | @subsection Duplicate an Open File Descriptor |
---|
[0874502] | 22 | |
---|
| 23 | @example |
---|
[5f4c109] | 24 | dup(), Function, Implemented |
---|
[2119f9d] | 25 | dup2(), Function, Untested Implementation |
---|
[0874502] | 26 | @end example |
---|
| 27 | |
---|
[2d19ed6c] | 28 | @section File Descriptor Deassignment |
---|
[0874502] | 29 | |
---|
[2d19ed6c] | 30 | @subsection Close a File |
---|
[0874502] | 31 | |
---|
| 32 | @example |
---|
[5f4c109] | 33 | close(), Function, Implemented |
---|
[0874502] | 34 | @end example |
---|
| 35 | |
---|
[2d19ed6c] | 36 | @section Input and Output |
---|
[0874502] | 37 | |
---|
[2d19ed6c] | 38 | @subsection Read from a File |
---|
[0874502] | 39 | |
---|
| 40 | @example |
---|
[5f4c109] | 41 | read(), Function, Implemented |
---|
[0874502] | 42 | @end example |
---|
| 43 | |
---|
[2d19ed6c] | 44 | @subsection Write to a File |
---|
[0874502] | 45 | |
---|
| 46 | @example |
---|
[5f4c109] | 47 | write(), Function, Implemented |
---|
[0874502] | 48 | @end example |
---|
| 49 | |
---|
[2d19ed6c] | 50 | @section Control Operations on Files |
---|
[0874502] | 51 | |
---|
[2d19ed6c] | 52 | @subsection Data Definitions for File Control Operations |
---|
[0874502] | 53 | |
---|
[2d19ed6c] | 54 | @subsection File Control |
---|
[0874502] | 55 | |
---|
| 56 | @example |
---|
[2a087f3] | 57 | struct flock, Type, Unimplemented |
---|
[5f4c109] | 58 | fcntl(), Function, Implemented |
---|
[180ca02] | 59 | F_DUPFD, Constant, Implemented |
---|
| 60 | F_GETFD, Constant, Implemented |
---|
| 61 | F_GETLK, Constant, Implemented |
---|
| 62 | F_SETFD, Constant, Implemented |
---|
| 63 | F_GETFL, Constant, Implemented |
---|
| 64 | F_SETFL, Constant, Implemented |
---|
| 65 | F_SETLK, Constant, Implemented |
---|
| 66 | F_SETLKW, Constant, Implemented |
---|
| 67 | FD_CLOEXEC, Constant, Implemented |
---|
| 68 | F_RDLCK, Constant, Implemented |
---|
| 69 | F_UNLCK, Constant, Implemented |
---|
| 70 | F_WRLCK, Constant, Implemented |
---|
| 71 | O_ACCMODE, Constant, Implemented |
---|
[7331714] | 72 | @end example |
---|
| 73 | |
---|
| 74 | NOTE: A number of constants are used by both @code{open} and @code{fcntl}. |
---|
| 75 | @code{O_CREAT}, @code{O_EXCL}, @code{O_NOCTTY}, @code{O_TRUNC}, |
---|
| 76 | @code{O_APPEND}, @code{O_DSYNC}, @code{O_NONBLOCK}, @code{O_RSYNC}, |
---|
| 77 | @code{O_SYNC}, @code{O_RDONLY}, @code{O_RDWR}, and @code{O_WRONLY} |
---|
| 78 | are also included in another section. @xref{Open a File}. |
---|
[0874502] | 79 | |
---|
[2d19ed6c] | 80 | @subsection Reposition Read/Write File Offset |
---|
[0874502] | 81 | |
---|
| 82 | @example |
---|
[2a087f3] | 83 | lseek(), Function, Partial Implementation |
---|
[180ca02] | 84 | SEEK_SET, Constant, Implemented |
---|
| 85 | SEEK_CUR, Constant, Implemented |
---|
| 86 | SEEK_END, Constant, Implemented |
---|
[0874502] | 87 | @end example |
---|
| 88 | |
---|
[2d19ed6c] | 89 | @section File Synchronization |
---|
[0874502] | 90 | |
---|
[2d19ed6c] | 91 | @subsection Synchronize the State of a File |
---|
[0874502] | 92 | |
---|
| 93 | @example |
---|
[5f4c109] | 94 | fsync(), Function, Implemented |
---|
[0874502] | 95 | @end example |
---|
| 96 | |
---|
[2d19ed6c] | 97 | @subsection Synchronize the Data of a File |
---|
[0874502] | 98 | |
---|
| 99 | @example |
---|
[5f4c109] | 100 | fdatasync(), Function, Implemented |
---|
[0874502] | 101 | @end example |
---|
| 102 | |
---|
[2d19ed6c] | 103 | @section Asynchronous Input and Output |
---|
[0874502] | 104 | |
---|
[2d19ed6c] | 105 | @subsection Data Definitions for Asynchronous Input and Output |
---|
[0874502] | 106 | |
---|
[7331714] | 107 | @subsubsection Asynchronous I/O Control Block |
---|
| 108 | |
---|
[2a087f3] | 109 | @example |
---|
[6984a19] | 110 | struct aiocb, Type, Untested Implementation |
---|
[2a087f3] | 111 | @end example |
---|
| 112 | |
---|
[7331714] | 113 | @subsubsection Asynchronous I/O Manifest Constants |
---|
| 114 | |
---|
| 115 | @example |
---|
[180ca02] | 116 | AIO_CANCELED, Constant, Implemented |
---|
| 117 | AIO_NOTCANCELED, Constant, Implemented |
---|
| 118 | AIO_ALLDONE, Constant, Implemented |
---|
| 119 | LIO_WAIT, Constant, Implemented |
---|
| 120 | LIO_NOWAIT, Constant, Implemented |
---|
| 121 | LIO_READ, Constant, Implemented |
---|
| 122 | LIO_WRITE, Constant, Implemented |
---|
| 123 | LIO_NOP, Constant, Implemented |
---|
[7331714] | 124 | @end example |
---|
| 125 | |
---|
[2d19ed6c] | 126 | @subsection Asynchronous Read |
---|
[0874502] | 127 | |
---|
| 128 | @example |
---|
[2a087f3] | 129 | aio_read(), Function, Dummy Implementation |
---|
[0874502] | 130 | @end example |
---|
| 131 | |
---|
[2d19ed6c] | 132 | @subsection Asynchronous Write |
---|
[0874502] | 133 | |
---|
| 134 | @example |
---|
[2a087f3] | 135 | aio_write(), Function, Dummy Implementation |
---|
[0874502] | 136 | @end example |
---|
| 137 | |
---|
[2d19ed6c] | 138 | @subsection List Directed I/O |
---|
[0874502] | 139 | |
---|
| 140 | @example |
---|
[2a087f3] | 141 | lio_listio(), Function, Dummy Implementation |
---|
[0874502] | 142 | @end example |
---|
| 143 | |
---|
[2d19ed6c] | 144 | @subsection Retrieve Error Status of Asynchronous I/O Operation |
---|
[0874502] | 145 | |
---|
| 146 | @example |
---|
[2a087f3] | 147 | aio_error(), Function, Dummy Implementation |
---|
[0874502] | 148 | @end example |
---|
| 149 | |
---|
[2d19ed6c] | 150 | @subsection Retrieve Return Status of Asynchronous I/O Operation |
---|
[0874502] | 151 | |
---|
| 152 | @example |
---|
[2a087f3] | 153 | aio_return(), Function, Dummy Implementation |
---|
[0874502] | 154 | @end example |
---|
| 155 | |
---|
[2d19ed6c] | 156 | @subsection Cancel Asynchronous I/O Request |
---|
[0874502] | 157 | |
---|
| 158 | @example |
---|
[2a087f3] | 159 | aio_cancel(), Function, Dummy Implementation |
---|
[0874502] | 160 | @end example |
---|
| 161 | |
---|
[2d19ed6c] | 162 | @subsection Wait for Asynchronous I/O Request |
---|
[0874502] | 163 | |
---|
| 164 | @example |
---|
[2a087f3] | 165 | aio_suspend(), Function, Dummy Implementation |
---|
[0874502] | 166 | @end example |
---|
| 167 | |
---|
[2d19ed6c] | 168 | @subsection Asynchronous File Synchronization |
---|
| 169 | |
---|
[0874502] | 170 | @example |
---|
[2a087f3] | 171 | aio_fsync(), Function, Dummy Implementation |
---|
[0874502] | 172 | @end example |
---|
| 173 | |
---|