Xinu7/man/man2/write.2

.TH WRITE 2
.SH NAME
write \- write a sequence of characters from a buffer
.SH SYNOPSIS
.nf
.B int write(dev, buff, count)
.B int dev;
.B char *buff;
.B int count;
.SH DESCRIPTION
.I Write
writes
.I count
characters to the I/O device given by
.I dev,
from sequential locations of the buffer,
.I buff.
.I Write
returns SYSERR if
.I dev
or
.I count
is invalid, OK for a successful write.
Write normally returns when it is safe for the user
to change the contents of the buffer.
For some devices this means write will wait for I/O to
complete before returning.
On other devices, the data is copied into a kernel buffer
and the write returns while it is being transferred.
.SH SEE ALSO
close(2), control(2), getc(2), open(2), putc(2), read(2), seek(2)
.SH BUGS
Write may not have exclusive use of the I/O device, so output from
other processes may be mixed in.