@c
|
@c
|
@c COPYRIGHT (c) 1988-2002.
|
@c COPYRIGHT (c) 1988-2002.
|
@c On-Line Applications Research Corporation (OAR).
|
@c On-Line Applications Research Corporation (OAR).
|
@c All rights reserved.
|
@c All rights reserved.
|
@c
|
@c
|
@c ch06.t,v 1.14 2002/01/17 21:47:45 joel Exp
|
@c ch06.t,v 1.14 2002/01/17 21:47:45 joel Exp
|
@c
|
@c
|
|
|
@chapter Input and Output Primitives
|
@chapter Input and Output Primitives
|
|
|
@section Pipes
|
@section Pipes
|
|
|
@subsection Create an Inter-Process Channel
|
@subsection Create an Inter-Process Channel
|
|
|
@example
|
@example
|
pipe(), Function, Dummy Implementation
|
pipe(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
NOTE: pipe() returns ENOSYS.
|
NOTE: pipe() returns ENOSYS.
|
|
|
@section File Descriptor Manipulation
|
@section File Descriptor Manipulation
|
|
|
@subsection Duplicate an Open File Descriptor
|
@subsection Duplicate an Open File Descriptor
|
|
|
@example
|
@example
|
dup(), Function, Implemented
|
dup(), Function, Implemented
|
dup2(), Function, Implemented
|
dup2(), Function, Implemented
|
@end example
|
@end example
|
|
|
@section File Descriptor Deassignment
|
@section File Descriptor Deassignment
|
|
|
@subsection Close a File
|
@subsection Close a File
|
|
|
@example
|
@example
|
close(), Function, Implemented
|
close(), Function, Implemented
|
@end example
|
@end example
|
|
|
@section Input and Output
|
@section Input and Output
|
|
|
@subsection Read from a File
|
@subsection Read from a File
|
|
|
@example
|
@example
|
read(), Function, Implemented
|
read(), Function, Implemented
|
@end example
|
@end example
|
|
|
@subsection Write to a File
|
@subsection Write to a File
|
|
|
@example
|
@example
|
write(), Function, Implemented
|
write(), Function, Implemented
|
@end example
|
@end example
|
|
|
@section Control Operations on Files
|
@section Control Operations on Files
|
|
|
@subsection Data Definitions for File Control Operations
|
@subsection Data Definitions for File Control Operations
|
|
|
@subsection File Control
|
@subsection File Control
|
|
|
@example
|
@example
|
struct flock, Type, Implemented
|
struct flock, Type, Implemented
|
fcntl(), Function, Implemented
|
fcntl(), Function, Implemented
|
F_DUPFD, Constant, Implemented
|
F_DUPFD, Constant, Implemented
|
F_GETFD, Constant, Implemented
|
F_GETFD, Constant, Implemented
|
F_GETLK, Constant, Implemented
|
F_GETLK, Constant, Implemented
|
F_SETFD, Constant, Implemented
|
F_SETFD, Constant, Implemented
|
F_GETFL, Constant, Implemented
|
F_GETFL, Constant, Implemented
|
F_SETFL, Constant, Implemented
|
F_SETFL, Constant, Implemented
|
F_SETLK, Constant, Implemented
|
F_SETLK, Constant, Implemented
|
F_SETLKW, Constant, Implemented
|
F_SETLKW, Constant, Implemented
|
FD_CLOEXEC, Constant, Implemented
|
FD_CLOEXEC, Constant, Implemented
|
F_RDLCK, Constant, Implemented
|
F_RDLCK, Constant, Implemented
|
F_UNLCK, Constant, Implemented
|
F_UNLCK, Constant, Implemented
|
F_WRLCK, Constant, Implemented
|
F_WRLCK, Constant, Implemented
|
O_ACCMODE, Constant, Implemented
|
O_ACCMODE, Constant, Implemented
|
@end example
|
@end example
|
|
|
NOTE: A number of constants are used by both @code{open} and @code{fcntl}.
|
NOTE: A number of constants are used by both @code{open} and @code{fcntl}.
|
@code{O_CREAT}, @code{O_EXCL}, @code{O_NOCTTY}, @code{O_TRUNC},
|
@code{O_CREAT}, @code{O_EXCL}, @code{O_NOCTTY}, @code{O_TRUNC},
|
@code{O_APPEND}, @code{O_DSYNC}, @code{O_NONBLOCK}, @code{O_RSYNC},
|
@code{O_APPEND}, @code{O_DSYNC}, @code{O_NONBLOCK}, @code{O_RSYNC},
|
@code{O_SYNC}, @code{O_RDONLY}, @code{O_RDWR}, and @code{O_WRONLY}
|
@code{O_SYNC}, @code{O_RDONLY}, @code{O_RDWR}, and @code{O_WRONLY}
|
are also included in another section. @xref{Open a File}.
|
are also included in another section. @xref{Open a File}.
|
|
|
@subsection Reposition Read/Write File Offset
|
@subsection Reposition Read/Write File Offset
|
|
|
@example
|
@example
|
lseek(), Function, Implemented
|
lseek(), Function, Implemented
|
SEEK_SET, Constant, Implemented
|
SEEK_SET, Constant, Implemented
|
SEEK_CUR, Constant, Implemented
|
SEEK_CUR, Constant, Implemented
|
SEEK_END, Constant, Implemented
|
SEEK_END, Constant, Implemented
|
@end example
|
@end example
|
|
|
@section File Synchronization
|
@section File Synchronization
|
|
|
@subsection Synchronize the State of a File
|
@subsection Synchronize the State of a File
|
|
|
@example
|
@example
|
fsync(), Function, Implemented
|
fsync(), Function, Implemented
|
@end example
|
@end example
|
|
|
@subsection Synchronize the Data of a File
|
@subsection Synchronize the Data of a File
|
|
|
@example
|
@example
|
fdatasync(), Function, Implemented
|
fdatasync(), Function, Implemented
|
@end example
|
@end example
|
|
|
@section Asynchronous Input and Output
|
@section Asynchronous Input and Output
|
|
|
@subsection Data Definitions for Asynchronous Input and Output
|
@subsection Data Definitions for Asynchronous Input and Output
|
|
|
@subsubsection Asynchronous I/O Control Block
|
@subsubsection Asynchronous I/O Control Block
|
|
|
@example
|
@example
|
struct aiocb, Type, Untested Implementation
|
struct aiocb, Type, Untested Implementation
|
@end example
|
@end example
|
|
|
@subsubsection Asynchronous I/O Manifest Constants
|
@subsubsection Asynchronous I/O Manifest Constants
|
|
|
@example
|
@example
|
AIO_CANCELED, Constant, Implemented
|
AIO_CANCELED, Constant, Implemented
|
AIO_NOTCANCELED, Constant, Implemented
|
AIO_NOTCANCELED, Constant, Implemented
|
AIO_ALLDONE, Constant, Implemented
|
AIO_ALLDONE, Constant, Implemented
|
LIO_WAIT, Constant, Implemented
|
LIO_WAIT, Constant, Implemented
|
LIO_NOWAIT, Constant, Implemented
|
LIO_NOWAIT, Constant, Implemented
|
LIO_READ, Constant, Implemented
|
LIO_READ, Constant, Implemented
|
LIO_WRITE, Constant, Implemented
|
LIO_WRITE, Constant, Implemented
|
LIO_NOP, Constant, Implemented
|
LIO_NOP, Constant, Implemented
|
@end example
|
@end example
|
|
|
@subsection Asynchronous Read
|
@subsection Asynchronous Read
|
|
|
@example
|
@example
|
aio_read(), Function, Dummy Implementation
|
aio_read(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Asynchronous Write
|
@subsection Asynchronous Write
|
|
|
@example
|
@example
|
aio_write(), Function, Dummy Implementation
|
aio_write(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection List Directed I/O
|
@subsection List Directed I/O
|
|
|
@example
|
@example
|
lio_listio(), Function, Dummy Implementation
|
lio_listio(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Retrieve Error Status of Asynchronous I/O Operation
|
@subsection Retrieve Error Status of Asynchronous I/O Operation
|
|
|
@example
|
@example
|
aio_error(), Function, Dummy Implementation
|
aio_error(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Retrieve Return Status of Asynchronous I/O Operation
|
@subsection Retrieve Return Status of Asynchronous I/O Operation
|
|
|
@example
|
@example
|
aio_return(), Function, Dummy Implementation
|
aio_return(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Cancel Asynchronous I/O Request
|
@subsection Cancel Asynchronous I/O Request
|
|
|
@example
|
@example
|
aio_cancel(), Function, Dummy Implementation
|
aio_cancel(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Wait for Asynchronous I/O Request
|
@subsection Wait for Asynchronous I/O Request
|
|
|
@example
|
@example
|
aio_suspend(), Function, Dummy Implementation
|
aio_suspend(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
@subsection Asynchronous File Synchronization
|
@subsection Asynchronous File Synchronization
|
|
|
@example
|
@example
|
aio_fsync(), Function, Dummy Implementation
|
aio_fsync(), Function, Dummy Implementation
|
@end example
|
@end example
|
|
|
|
|