Create a fresh vector of handlers on startup.

This commit is contained in:
mainzelm 2002-09-06 11:25:59 +00:00
parent ff0ce8fdfb
commit 48a009c698
1 changed files with 5 additions and 8 deletions

View File

@ -94,9 +94,10 @@
(set-enabled-interrupts before) (set-enabled-interrupts before)
return))) return)))
(define *interrupt-handlers-vector*)
(define *interrupt-handlers-vector* (define (install-fresh-interrupt-handlers-vector!)
(make-vector number-of-interrupts #t)) (set! *interrupt-handlers-vector* (make-vector number-of-interrupts #t)))
(define (interrupt-handlers-vector) (define (interrupt-handlers-vector)
*interrupt-handlers-vector*) *interrupt-handlers-vector*)
@ -162,11 +163,7 @@
(interrupt-handler-ref int)) (interrupt-handler-ref int))
(define (with-scsh-sighandlers interactive? thunk) (define (with-scsh-sighandlers interactive? thunk)
(do ((int 0 (+ int 1))) (install-fresh-interrupt-handlers-vector!)
((= int number-of-interrupts))
(set-interrupt-handler
int
(lambda a #f)))
(do ((sig 32 (- sig 1))) (do ((sig 32 (- sig 1)))
((< sig 0)) ((< sig 0))
(let ((i (%signal->interrupt sig))) (let ((i (%signal->interrupt sig)))