Useful facility

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Mon Oct 26 19:58:55 AEST 1981


>From root at mit-csr@mit-multics Mon Oct 26 19:01:42 1981
	I am about to add what i think is a very useful facility
to my system here. It's very small, so I thought I'd send out a
note about it.
	Basically, it's a new call, fiowait. It takes two arguments,
a channel and a flag word (a la open). It returns whenever any
activity of the type specified occurs on the file open on channel.
It's most useful for spoolers where one communicates with them by
writing a request file, such as the LPT and Mail daemons here. The
spooler just opens the directory as a file, and waits for a write.
	The implementation is trivial. There are two new inode flags,
on to say "wake on write" and the otehr for read. In rdwri, just
add a line of code to check to see if the flag is on, and if so
do a wakeup. Fiowait would set the flag(s), do a sleep, clear the
flags and return.
	Noel
-------



More information about the Comp.unix.wizards mailing list