forsyth20121205-174063a80cc13 years agoHistory
35 lines · 990 B · Text
RawDownload
.TH SYS-IOUNIT 2.SH NAMEiounit \- return size of atomic I/O unit for file descriptor.SH SYNOPSIS.EXinclude "sys.m";sys := load Sys Sys->PATH; iounit:	fn(fd: ref FD): int;.EE.SH DESCRIPTIONReads and writes of files are transmitted using the 9P protocol (see.IR intro (5))and in general, operations involving large amounts of data must bebroken into smaller pieces by the operating system.The `I/O unit' associated with each file descriptor records the maximumsize, in bytes, that may be read or written without breaking up the transfer..PPThe.B iounitsystem call returns the I/O unit size for the open file.IR fd .Certain file descriptors, particularly those associated with devices, mayhave no specific I/O unit, in which case.B iounitwill 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 DIAGNOSTICSReturns zero if any error occurs or if the I/O unit size of the fd is unspecified or unknown.