[APE Index] [APE Hierarchy] [Headers]
kernel buffering between processes and/or threads. More...
#include <thread.h>
The Pipe uses system kernel buffering to hold data being passed either between two execution contexts within the same process, or between different processes. Unlike Buffer, Pipe uses system descriptors and kernel memory. Under Posix, the size of the pipe and associated kernel memory is always a fixed constant as defined by _PC_PIPE_BUF. Since the pipe does not deal with fixed objects, any data can be read from or written to the kernel pipe buffer.
[public]
Create a kernel pipe descriptor set using pipe().
[public]
Destroy the pipe and kernel descriptor resources.
[public]
Create a pipe as a duplicate of an existing pipe.
orig | pipe to duplicate. |
[public]
Read an arbitrary number of bytes from the pipe buffer.
addr | pointer to store read data. |
len | number of bytes to read. |
[public]
Write an arbitrary number of butes to the pipe buffer.
addr | pointer to write data from. |
len | number of butes to write. |
[protected]
Sender is often used for implementing a fork()'d message port between processes. By defining the current pipe as only used for sending, the receiver is presumed to be in the other half of a fork()'d process.
[protected]
Receiver is often used for implementing a fork()'d message port between processes. By defining the current pipe as only used for receiving, the sender is presumed to be in the other half of a fork()'d process.
| Kdoc |