#include <sys/pipe.h>
sys/pipe.h
NOTICE: This file was modified by SPARTA, Inc. in 2006 to introduce
support for mandatory and extensible security protections. This notice
is included in support of clause 2.2 (b) of the Apple Public License,
Version 2.0.
macroPIPE_SIZE
Pipe buffer size, keep moderate in value, pipes take kva space.
#define PIPE_SIZE 16384
macroPIPE_KVAMAX
#define PIPE_KVAMAX (1024 * 1024 * 16)
macroBIG_PIPE_SIZE
#define BIG_PIPE_SIZE (64*1024)
macroSMALL_PIPE_SIZE
#define SMALL_PIPE_SIZE PAGE_SIZE
macroPIPE_MINDIRECT
#define PIPE_MINDIRECT 8192
macroPIPENPAGES
#define PIPENPAGES (BIG_PIPE_SIZE / PAGE_SIZE + 1)
structpipebuf
Pipe buffer information.
Separate in, out, cnt are used to simplify calculations.
Buffered write is active when the buffer.cnt field is set.
| u_int | cnt | number of chars currently in buffer |
| u_int | in | in pointer |
| u_int | out | out pointer |
| u_int | size | size of buffer |
| caddr_t | buffer | kva of buffer |
macroPIPE_EOF
was PIPE_SEL 0x040 /* Pipe has a select active. */
#define PIPE_EOF 0x080
Pipe is in EOF condition.
macroPIPE_DRAIN
was PIPE_KNOTE 0x1000
#define PIPE_DRAIN 0x2000
Waiting for I/O to drop for a close. Treated like EOF;
only separate for easier debugging.