Aucbvax.4693 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Mon Oct 26 19:58:55 1981 Useful facility >From root@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 ------- ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.