diff --git a/library.scm b/library.scm
index 31e1e0c..cbe6bf3 100644
|
a
|
b
|
EOF
|
| 4445 | 4445 | |
| 4446 | 4446 | (define ##sys#signal-vector (make-vector 256 #f)) |
| 4447 | 4447 | |
| 4448 | | (define (##sys#interrupt-hook reason state) |
| 4449 | | (let loop ((reason reason)) |
| 4450 | | (cond ((and reason (##sys#slot ##sys#signal-vector reason)) => |
| 4451 | | (lambda (handler) |
| 4452 | | (handler reason) |
| 4453 | | (loop (##core#inline "C_i_pending_interrupt" #f)))) |
| 4454 | | ((fx> (##sys#slot ##sys#pending-finalizers 0) 0) |
| 4455 | | (##sys#run-pending-finalizers state) ) |
| 4456 | | ((procedure? state) (state)) |
| 4457 | | (else (##sys#context-switch state) ) ) ) ) |
| | 4448 | (define ##sys#interrupt-hook |
| | 4449 | (let ((foo #f)) |
| | 4450 | (lambda (reason state) |
| | 4451 | (if foo |
| | 4452 | (begin |
| | 4453 | (cond ((and reason (##sys#slot ##sys#signal-vector reason)) => |
| | 4454 | (lambda (handler) |
| | 4455 | (handler reason)))) |
| | 4456 | (##sys#context-switch state)) |
| | 4457 | (begin |
| | 4458 | (set! foo #t) |
| | 4459 | (let loop ((reason reason)) |
| | 4460 | (cond ((and reason (##sys#slot ##sys#signal-vector reason)) => |
| | 4461 | (lambda (handler) |
| | 4462 | (handler reason) |
| | 4463 | (loop (##core#inline "C_i_pending_interrupt" #f)))) |
| | 4464 | ((fx> (##sys#slot ##sys#pending-finalizers 0) 0) |
| | 4465 | (##sys#run-pending-finalizers state) ) |
| | 4466 | ((procedure? state) (state)) |
| | 4467 | (else (##sys#context-switch state) ) ) ) |
| | 4468 | (set! foo #f))))) ) |
| 4458 | 4469 | |
| 4459 | 4470 | (define (##sys#dispatch-interrupt k) |
| 4460 | 4471 | (##sys#interrupt-hook |