Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (26 sloc) 1.207 kB
6acf721 Massive reorg
Scott Bronson authored
1 struct pipe;
2
3 /** A pipe atom is used to either fill or drain a pipe fifo.
4 * A single atom may be used for reading one fifo and simultaneously
5 * writing another.
6 */
7
8 typedef struct {
9 io_atom atom; // represents a file or socket
559809b It wooooooooooorks!!! Appears to sometimes hang in io_wait at the en…
Scott Bronson authored
10 struct pipe *read_pipe; // the pipe that this atom reads its data into (this field has also been usurped to be the read verso refcon)
6acf721 Massive reorg
Scott Bronson authored
11 struct pipe *write_pipe; // the pipe that this atom gets its data from
12 } pipe_atom;
13
14
15 struct pipe {
16 struct fifo fifo; // the fifo itself
17 pipe_atom *read_atom; // all data read from here ...
18 pipe_atom *write_atom; // ... gets written to here
19 int block_read; // 1 if we need to stop reading, 0 if not.
912d58c Added idle proc, scanning for ZFIN, some bug fixes. Getting close.
Scott Bronson authored
20 int bytes_written; // a monotonically increasing count of the number of bytes written.
6acf721 Massive reorg
Scott Bronson authored
21 };
22
23
c706b3b In-progress checkin since there's been a lot of changes.
Scott Bronson authored
24 int pipe_prepend(struct pipe *pipe, const char *buf, int size);
25 int pipe_write(struct pipe *pipe, const char *buf, int size);
49aaf0d Big reorg is mostly done. Echo works, rz still needs to be debugged.
Scott Bronson authored
26
6acf721 Massive reorg
Scott Bronson authored
27 void pipe_atom_init(pipe_atom *atom, int fd);
49aaf0d Big reorg is mostly done. Echo works, rz still needs to be debugged.
Scott Bronson authored
28 void pipe_atom_destroy(pipe_atom *atom);
6acf721 Massive reorg
Scott Bronson authored
29
49aaf0d Big reorg is mostly done. Echo works, rz still needs to be debugged.
Scott Bronson authored
30 void pipe_init(struct pipe *pipe, pipe_atom *ratom, pipe_atom *watom, int size);
31 void pipe_destroy(struct pipe *pipe);
6acf721 Massive reorg
Scott Bronson authored
32
49aaf0d Big reorg is mostly done. Echo works, rz still needs to be debugged.
Scott Bronson authored
33 void pipe_io_proc(io_atom *aa, int flags);
6acf721 Massive reorg
Scott Bronson authored
34
912d58c Added idle proc, scanning for ZFIN, some bug fixes. Getting close.
Scott Bronson authored
35
36 // utility function
37 int set_nonblock(int fd);
38
Something went wrong with that request. Please try again.