Xinu7/man/man2/write.doc




WRITE(2)            Xinu Programmer's Manual             WRITE(2)



NAME
     write - write a sequence of characters from a buffer

SYNOPSIS
     int write(dev, buff, count)
     int dev;
     char *buff;
     int count;

DESCRIPTION
     _W_r_i_t_e writes _c_o_u_n_t characters to the I/O device given by
     _d_e_v, from sequential locations of the buffer, _b_u_f_f. _W_r_i_t_e
     returns SYSERR if _d_e_v or _c_o_u_n_t is invalid, OK for a success-
     ful 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 ker-
     nel buffer and the write returns while it is being
     transferred.

SEE ALSO
     close(2), control(2), getc(2), open(2), putc(2), read(2),
     seek(2)

BUGS
     Write may not have exclusive use of the I/O device, so out-
     put from other processes may be mixed in.




























Version 6b               Printed 1/12/87                        1