Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!ncis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!rutgers!bellcore!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.os.misc Subject: Re: Generalized bigotry Message-ID: <2766@ficc.uu.net> Date: 16 Jan 89 14:00:13 GMT References: <19@xenlink.UUCP> <225800108@uxe.cso.uiuc.edu> <2075@scolex> Organization: Xenix Support Lines: 34 Well, I'm not sure if you're flaming me or not. But I'm quite moderate. I believe single-character I/O, asynchronous I/O, and so on all have a place. But that place is not in the 'C' standard. Perhaps a standard set of real-time calls can be decided on. A set more suited to a wider variety of operating systems. Something like: token = start_read(fd, buffer, nbytes, timeout); ... nread = check_io(token); ... nread = wait_io(token); With the caveat that the number returned from check_io may not actually be a count on all systems, or may remain 0 until the buffer is completely full. I think this is implementable on all systems that support async I/O. On System V, where you would use an ioctl to set VMIN and VTIME to nbytes and timeout, these could be cached so they can be left alone for multiple reads of the same size. On a system without asynchronous I/O, start_read would just stuff the parms into token, check_io would return 0, and wait_io would do the actual read. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Work: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. `-_-' Home: bigtex!texbell!sugar!peter, peter@sugar.uu.net. 'U` Opinions may not represent the policies of FICC or the Xenix Support group.