source: rtems-docs/posix1003_1/input_and_output.rst @ 489740f

4.115
Last change on this file since 489740f was 489740f, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 02:47:09

Set SPDX License Identifier in each source file.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
3Input and Output Primitives
4###########################
5
6Pipes
7=====
8
9Create an Inter-Process Channel
10-------------------------------
11
12.. code:: c
13
14    pipe(), Function, Dummy Implementation
15
16NOTE: pipe() returns ENOSYS.
17
18File Descriptor Manipulation
19============================
20
21Duplicate an Open File Descriptor
22---------------------------------
23
24.. code:: c
25
26    dup(), Function, Implemented
27    dup2(), Function, Implemented
28
29File Descriptor Deassignment
30============================
31
32Close a File
33------------
34
35.. code:: c
36
37    close(), Function, Implemented
38
39Input and Output
40================
41
42Read from a File
43----------------
44
45.. code:: c
46
47    read(), Function, Implemented
48
49Write to a File
50---------------
51
52.. code:: c
53
54    write(), Function, Implemented
55
56Control Operations on Files
57===========================
58
59Data Definitions for File Control Operations
60--------------------------------------------
61
62File Control
63------------
64
65.. code:: c
66
67    struct flock, Type, Implemented
68    fcntl(), Function, Implemented
69    F_DUPFD, Constant, Implemented
70    F_GETFD, Constant, Implemented
71    F_GETLK, Constant, Implemented
72    F_SETFD, Constant, Implemented
73    F_GETFL, Constant, Implemented
74    F_SETFL, Constant, Implemented
75    F_SETLK, Constant, Implemented
76    F_SETLKW, Constant, Implemented
77    FD_CLOEXEC, Constant, Implemented
78    F_RDLCK, Constant, Implemented
79    F_UNLCK, Constant, Implemented
80    F_WRLCK, Constant, Implemented
81    O_ACCMODE, Constant, Implemented
82
83NOTE: A number of constants are used by both ``open`` and ``fcntl``.``O_CREAT``, ``O_EXCL``, ``O_NOCTTY``, ``O_TRUNC``,``O_APPEND``, ``O_DSYNC``, ``O_NONBLOCK``, ``O_RSYNC``,``O_SYNC``, ``O_RDONLY``, ``O_RDWR``, and ``O_WRONLY``
84are also included in another section.  See `Open a File`_.
85
86Reposition Read/Write File Offset
87---------------------------------
88
89.. code:: c
90
91    lseek(), Function, Implemented
92    SEEK_SET, Constant, Implemented
93    SEEK_CUR, Constant, Implemented
94    SEEK_END, Constant, Implemented
95
96File Synchronization
97====================
98
99Synchronize the State of a File
100-------------------------------
101
102.. code:: c
103
104    fsync(), Function, Implemented
105
106Synchronize the Data of a File
107------------------------------
108
109.. code:: c
110
111    fdatasync(), Function, Implemented
112
113Asynchronous Input and Output
114=============================
115
116Data Definitions for Asynchronous Input and Output
117--------------------------------------------------
118
119Asynchronous I/O Control Block
120~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
122.. code:: c
123
124    struct aiocb, Type, Untested Implementation
125
126Asynchronous I/O Manifest Constants
127~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128
129.. code:: c
130
131    AIO_CANCELED, Constant, Implemented
132    AIO_NOTCANCELED, Constant, Implemented
133    AIO_ALLDONE, Constant, Implemented
134    LIO_WAIT, Constant, Implemented
135    LIO_NOWAIT, Constant, Implemented
136    LIO_READ, Constant, Implemented
137    LIO_WRITE, Constant, Implemented
138    LIO_NOP, Constant, Implemented
139
140Asynchronous Read
141-----------------
142
143.. code:: c
144
145    aio_read(), Function, Dummy Implementation
146
147Asynchronous Write
148------------------
149
150.. code:: c
151
152    aio_write(), Function, Dummy Implementation
153
154List Directed I/O
155-----------------
156
157.. code:: c
158
159    lio_listio(), Function, Dummy Implementation
160
161Retrieve Error Status of Asynchronous I/O Operation
162---------------------------------------------------
163
164.. code:: c
165
166    aio_error(), Function, Dummy Implementation
167
168Retrieve Return Status of Asynchronous I/O Operation
169----------------------------------------------------
170
171.. code:: c
172
173    aio_return(), Function, Dummy Implementation
174
175Cancel Asynchronous I/O Request
176-------------------------------
177
178.. code:: c
179
180    aio_cancel(), Function, Dummy Implementation
181
182Wait for Asynchronous I/O Request
183---------------------------------
184
185.. code:: c
186
187    aio_suspend(), Function, Dummy Implementation
188
189Asynchronous File Synchronization
190---------------------------------
191
192.. code:: c
193
194    aio_fsync(), Function, Dummy Implementation
195
196.. COMMENT: COPYRIGHT (c) 1988-2002.
197
198.. COMMENT: On-Line Applications Research Corporation (OAR).
199
200.. COMMENT: All rights reserved.
201
Note: See TracBrowser for help on using the repository browser.