diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/sys-iounit | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'man/2/sys-iounit')
| -rw-r--r-- | man/2/sys-iounit | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/man/2/sys-iounit b/man/2/sys-iounit new file mode 100644 index 00000000..0f8ef118 --- /dev/null +++ b/man/2/sys-iounit @@ -0,0 +1,35 @@ +.TH SYS-IOUNIT 2 +.SH NAME +iounit \- return size of atomic I/O unit for file descriptor +.SH SYNOPSIS +.EX +include "sys.m"; +sys := load Sys Sys->PATH; + +iounit: fn(fd: ref FD): int; +.EE +.SH DESCRIPTION +Reads and writes of files are transmitted using the Styx protocol (see +.IR intro (5)) +and in general, operations involving large amounts of data must be +broken into smaller pieces by the operating system. +The `I/O unit' associated with each file descriptor records the maximum +size, in bytes, that may be read or written without breaking up the transfer. +.PP +The +.B iounit +system call returns the I/O unit size for the open file +.IR fd . +Certain file descriptors, particularly those associated with devices, may +have no specific I/O unit, in which case +.B iounit +will return zero. +.SH SOURCE +.B /emu/port/inferno.c +.br +.B /os/port/inferno.c +.SH SEE ALSO +.IR sys-dup (2), +.IR read (5) +.SH DIAGNOSTICS +Returns zero if any error occurs or if the I/O unit size of the fd is unspecified or unknown. |
