diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-19 03:31:17 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-19 03:31:17 +0200 |
commit | 71cda09d1ec39aa29dc4bcdd332fa64ca7169d59 (patch) | |
tree | a692f0f52a00df91322ed791b26e4d775de8ffe1 /sys/man/3 | |
parent | 0bdfa3699dede75e657a24bd22e0e4aa7eafd5e4 (diff) |
devstream: fast sequential file access with 9p pipelining experiment
Diffstat (limited to 'sys/man/3')
-rw-r--r-- | sys/man/3/stream | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sys/man/3/stream b/sys/man/3/stream new file mode 100644 index 000000000..fb20cb51f --- /dev/null +++ b/sys/man/3/stream @@ -0,0 +1,40 @@ +.TH STREAM 3 +.SH NAME +stream \- fast sequential file access +.SH SYNOPSIS +.nf +.B bind #ΒΆ /fd + +.B /fd/0stream +.B /fd/1stream +\&... +.fi +.SH DESCRIPTION +The +.I stream +device serves a one-level directory containing files of the form +.IR N stream +where +.I N +is a file descriptor of the current process. +.PP +An +.IR open (2) +returns a stream file descriptor connected to the original file +refered to by the file descriptor +.IR N . +When a stream was opend for reading, the device will start +continuously reading the file in the background until it reaches +the end of the file. A +.IR read (2) +on the stream consumes the prefetched data in sequential order. +.PP +When a stream is opend for writing, writes to the stream will +return immidiately without waiting for the data to be written +to the file. A zero-length write can be used to wait for the +buffered data to drain and return any previous write errors. +.SH SEE ALSO +.IR dup (2), +.IR pipe (3) +.SH SOURCE +.B /sys/src/9/port/devstream.c |