- Interrupt handlers really installed and documented.

- File locking fixed to use proc objects instead of pids, and bugs in code
  and documentation fixed.
This commit is contained in:
shivers 1996-11-10 13:56:13 +00:00
parent 52cd685e9a
commit 7e66a68afa
4 changed files with 130 additions and 9 deletions

9
NEWS
View File

@ -2,6 +2,15 @@
Recent changes to the Scheme Shell. Recent changes to the Scheme Shell.
??/??/?? (version 0.4.5 presumably)
lock-region record now stores the *proc object* of the locking
process, not the integer pid. A bug in unlock-region was fixed,
and the documentation was fixed up.
Did we say we had signal handlers installed in the last release?
Now we do. Really. Installed & documented.
Hopefully, bdc will change this line to say the static heap
linker is documented.
11/03/96 (version 0.4.4) 11/03/96 (version 0.4.4)
minor fixes for SunOS, Solaris, AIX, NeXTStep, 686 systems minor fixes for SunOS, Solaris, AIX, NeXTStep, 686 systems
minor static heap linker fixes minor static heap linker fixes

View File

@ -137,14 +137,14 @@ We even have one of those URL things:
===================== =====================
** Signal handlers ** Signal handlers
We finally have signal handlers; with this Scsh now has all of Posix. We finally have signal handlers. Go wild.
** Static heap linker ** Static heap linker
The static heap linker converts a Scheme 48 bytecode image as The static heap linker converts a Scheme 48 bytecode image as
embodied in a .image file to a C representation. This C embodied in a .image file to a C representation. This C
code is then compiled and linked in with a virtual machine. One code is then compiled and linked in with a virtual machine. One
pleasant side effect of this is reduced startup times. Another pleasant side effect of this is reduced startup times and heap sizes.
good thing is that immutable parts of the image can be shared Another good thing is that immutable parts of the image can be shared
between processes. see the script scsh/static.scm between processes. see the script scsh/static.scm
** Last few bits of Posix ** Last few bits of Posix
@ -166,7 +166,8 @@ We even have one of those URL things:
switch and with the (DUMP-SCSH-PROGRAM <file-name> <entry-point>) switch and with the (DUMP-SCSH-PROGRAM <file-name> <entry-point>)
are now equivalent in that both pass a list of command-line arguments are now equivalent in that both pass a list of command-line arguments
that includes the program name. The two start-up methods were not that includes the program name. The two start-up methods were not
the same in the previous release. the same in the previous release. NOTE: THIS IS A BACKWARDS-INCOMPATIBLE
CHANGE IN DUMP-SCSH-PROGRAM FROM THE PREVIOUS RELEASE.
** Etc. ** Etc.
Solaris 2 on i386 support, AIX 4 support, HP-UX now uses dld for Solaris 2 on i386 support, AIX 4 support, HP-UX now uses dld for

View File

@ -1,11 +1,13 @@
Scsh cheat sheet Scsh cheat sheet
Olin Shivers Olin Shivers
November 1994 November 1996
This cheat sheet is intentionally kept brief and minimalist. This cheat sheet is intentionally kept brief and minimalist.
It is intended to function as an ASCII-format reminder for the It is intended to function as an ASCII-format reminder for the
full manual, not as the definition. It can be read using GNU Emacs's full manual, not as the definition. It can be read using GNU Emacs's
outline mode. outline mode.
It is also not entirely up-to-date. I'd appreciate getting updates from users.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
* High-level forms * High-level forms
@ -174,6 +176,27 @@ Open flags:
(write-string/partial string [fd/port start end]) -> nwritten (write-string/partial string [fd/port start end]) -> nwritten
(force-output [fd/port]) (force-output [fd/port])
** File locking
(define-record lock-region
exclusive? ; write or read lock?
start ; integer: start, end & whence
end ; integer: define the region being locked.
whence ; The value of SEEK/SET, SEEK/DELTA, or SEEK/END.
proc) ; A proc object for the process locking the region.
(make-lock-region exclusive? start len [whence]) -> lock-region
WHENCE defaults to the value of SEEK/SET.
(lock-region fdes lock)
(lock-region/no-block fdes lock)
(get-lock-region fdes lock) -> lock-region or #f
(unlock-region fdes lock)
(with-region-lock* fdes lock thunk)
(with-region-lock fdes lock body ...) Syntax
** File system ** File system
(create-directory fname [perms override?]) (create-directory fname [perms override?])
(create-fifo fname [perms override?]) (create-fifo fname [perms override?])
@ -364,6 +387,67 @@ command-line-arguments
(pause-until-interrupt) (pause-until-interrupt)
(sleep secs) (sleep secs)
Non-signal S48 interrupts
-------------------------
interrupt/memory-shortage
Posix signals with S48 interrupts
------------------------------
signal/alrm interrupt/alrm (aka interrupt/alarm)
signal/int interrupt/int (aka interrupt/int)
signal/chld interrupt/chld
signal/cont interrupt/cont
signal/hup interrupt/hup
signal/quit interrupt/quit
signal/term interrupt/term
signal/tstp interrupt/tstp
signal/usr1 interrupt/usr1
signal/usr2 interrupt/usr2
signal/info interrupt/info Non-Posix
signal/io interrupt/io Non-Posix
signal/poll interrupt/poll Non-Posix
signal/prof interrupt/prof Non-Posix
signal/pwr interrupt/pwr Non-Posix
signal/urg interrupt/urg Non-Posix
signal/vtalrm interrupt/vtalrm Non-Posix
signal/winch interrupt/winch Non-Posix
signal/xcpu interrupt/xcpu Non-Posix
signal/xfsz interrupt/xfsz Non-Posix
Synchronous and uncatchable signals
-----------------------------------
signal/stop Uncatchable Posix
signal/kill Uncatchable Posix
signal/abrt Synchronous Posix
signal/fpe Synchronous Posix
signal/ill Synchronous Posix
signal/pipe Synchronous Posix
signal/segv Synchronous Posix
signal/ttin Synchronous Posix
signal/ttou Synchronous Posix
signal/bus Synchronous BSD + SVR4
signal/emt Synchronous BSD + SVR4
signal/iot Synchronous BSD + SVR4
signal/sys Synchronous BSD + SVR4
signal/trap Synchronous BSD + SVR4
** Interrupt handlers
(signal->interrupt sig) -> interrupt
(interrupt-set integer1 ...) -> integer
(enabled-interrupts) -> integer
(set-enabled-interrupts! integer) -> integer
(with-enabled-interrupts interrupt-set body ...) Syntax
(with-enabled-interrupts* interrupt-set thunk)
(set-interrupt-handler! interrupt handler) -> old-handler
(interrupt-handler interrupt) -> handler
HANDLER is #f (ignored), #t (default), or (lambda (enabled-ints) ...) proc.
** Time ** Time
(define-record date (define-record date

View File

@ -162,7 +162,8 @@
lock-region:whence lock-region:whence
lock-region:start lock-region:start
lock-region:len lock-region:len
lock-region:pid lock-region:pid ; Deprecated proc.
lock-region:proc
make-lock-region make-lock-region
lock-region lock-region
@ -986,10 +987,36 @@
(define-interface signal-handler-interface (define-interface signal-handler-interface
(export signal->interrupt (export signal->interrupt
interrupt-set interrupt-set
(with-enabled-interrupts :syntax) (with-enabled-interrupts :syntax)
with-enabled-interrupts* with-enabled-interrupts*
set-signal-handler! enabled-interrupts
signal-handler set-enabled-interrupts!
set-interrupt-handler!
interrupt-handler
%set-unix-signal-handler! %set-unix-signal-handler!
%unix-signal-handler %unix-signal-handler
))
interrupt/alrm interrupt/alarm
interrupt/int interrupt/keyboard
interrupt/memory-shortage
interrupt/chld
interrupt/cont
interrupt/hup
interrupt/quit
interrupt/term
interrupt/tstp
interrupt/usr1
interrupt/usr2
interrupt/info
interrupt/io
interrupt/poll
interrupt/prof
interrupt/pwr
interrupt/urg
interrupt/vtalrm
interrupt/winch
interrupt/xcpu
interrupt/xfsz))