From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 13 Apr 92 14:20:16 GMT From: emery@mitre-bedford.arpa (David Emery) Subject: Re: non-blocking I/O on Unix workstations Message-ID: List-Id: > 1) compilers that run on mainstream Unix systems that > just flat out provide non-blocking I/O for standard Ada > I/O calls. This is an operating system problem, not a compiler problem. Why do you expect a compiler to fix shortcomings in the operating system???? Non-blocking I/O on Unix is certainly a FAQ in these parts. There are techniques in various flavers of Unix to support non-blocking IO (e.g. the select() call.) But, these extensions are not portable, and it's my understanding that they often require support from device drivers that isn't always there. POSIX (P1003.1/ISO 9945-1) provides no facilities that guarantee non-blocking IO. The general view of a program (Ada or C) to Unix is a single process. The default behavior during a system call is that a process blocks during the system call. This hasn't been a problem for C, because C programs (on Unix) are not multi-threaded. The introduction of threads/lightweight process/etc. for C has raised this issue for C, too. In these cases, the implementation of a specific threads package on a specific system can take advantage of support in that system (often added to support C threads) for non-blocking I/O. When such systems are available (e.g. POSIX P1003.4a), then Ada can take advantage of them. dave