From: Chris Hanson Date: Tue, 27 Apr 1993 09:44:01 +0000 (+0000) Subject: This runtime requires microcode version 11.131 or later. Edwin X-Git-Tag: 20090517-FFI~8376 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=232b279db4fb4d810643a530139774569675bd87;p=mit-scheme.git This runtime requires microcode version 11.131 or later. Edwin versions prior to 3.78 will not work correctly with this runtime. The aim of these changes is to provide a central mechanism to detect input on all input channels, and thus to prevent a single thread from performing a blocking input operation that locks out other threads that can do useful work. Now, in places where a thread would block on an input device, it instead registers its interest in the device with a centralized registry, and suspends. If all threads in the system are suspended, then Scheme blocks by calling `select' and waiting for something interesting to happen. * Introduce new procedures that use the `select' system call to provide a mechanism to monitor input availability on many input devices simultaneously: ADD-TO-SELECT-REGISTRY! CHANNEL-DESCRIPTOR-FOR-SELECT DEREGISTER-INPUT-THREAD-EVENT MAKE-SELECT-REGISTRY PERMANENTLY-REGISTER-INPUT-THREAD-EVENT REGISTER-INPUT-THREAD-EVENT REMOVE-FROM-SELECT-REGISTRY! SELECT-DESCRIPTOR SELECT-REGISTRY-TEST TEST-FOR-INPUT-ON-CHANNEL TEST-FOR-INPUT-ON-DESCRIPTOR These procedures require the operating system to support `select' or some equivalent. Calling them in another operating system, e.g. DOS, will cause an error to be signalled. * Delete old `select' mechanism procedures which are no longer used or supported (these will be deleted from the microcode in the future): CHANNEL-REGISTER CHANNEL-UNREGISTER CHANNEL-REGISTERED? CHANNEL-SELECT-THEN-READ * Modify CHANNEL-READ to automatically call TEST-FOR-INPUT-ON-CHANNEL if the `select' system call is supported by the operating system. One consequence of this is that CHANNEL-READ can return #F for channels that are in "blocking" mode; if you don't want #F you must call CHANNEL-READ-BLOCK instead (this was always a good idea anyway). * Change X graphics devices to use the new select machinery to preview the event stream from the X server. -------------------- The following changes are not part of the general aim stated above, although most of them either derive from it or support it: * Add new procedures to the "threads" package: (THREADS-LIST) returns a list of all thread objects, including dead threads, that haven't yet been garbage collected. (THREAD-EXECUTION-STATE thread) returns the "execution state" of a thread, a symbol. * Add code to the threads package that attempts to clean up all attachments of the thread when it is exited. This is a generalization of previous patches generated by GJR and GJS for 6.001. * Plug several holes in the thread event delivery mechanism which allowed the threads package to get into states where events were not delivered to their threads. * SUSPEND-CURRENT-THREAD now returns the event that caused the thread the be resumed; previously it had an unspecified value. If several events are delivered before resumption, the event returned is the first one that is not #F, or #F if all of the events were #F. * Fix several typos that caused errors when generating reports for conditions in the threads package. --- diff --git a/v7/src/runtime/version.scm b/v7/src/runtime/version.scm index 68d761413..3d1aef11a 100644 --- a/v7/src/runtime/version.scm +++ b/v7/src/runtime/version.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: version.scm,v 14.160 1993/01/12 23:08:40 gjr Exp $ +$Id: version.scm,v 14.161 1993/04/27 09:44:01 cph Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -45,7 +45,7 @@ MIT in each case. |# '())) (add-system! microcode-system) (add-event-receiver! event:after-restore snarf-microcode-version!) - (add-identification! "Runtime" 14 160)) + (add-identification! "Runtime" 14 161)) (define microcode-system)