9srv Manual Collection/plan9/ioproc(2) | 9srv Manual Collection/plan9/ioproc(2) |
---|
Ioproc forks a new slave proc and returns a pointer to the Ioproc associated with it. Ioproc uses mallocz and proccreate; if either fails, it calls sysfatal rather than return an error.
Ioopen, ioclose, ioread, ioreadn, iowrite, and iodial execute the similarly named library or system calls (see open(2), read(2), and dial(2)) in the slave process associated with io. It is an error to execute more than one call at a time in an I/O proc.
Iointerrupt interrupts the call currently executing in the I/O proc. If no call is executing, iointerrupt is a no-op.
Closeioproc terminates the I/O proc and frees the associated Ioproc .
Iocall is a primitive that may be used to implement more slave I/O routines. Iocall arranges for op to be called in io's proc, with arg set to the variable parameter list, returning the value that op returns.
If the two relaythread instances were running in different procs, the common access to tot would be unsafe.
Implement ioread:
9srv Manual Collection/plan9/ioproc(2) | Rev: Sun Dec 02 23:42:20 GMT 2007 |