jsut small fixes and comments

This commit is contained in:
marting 1999-10-08 18:38:10 +00:00
parent 41c9c192b5
commit 7927367f49
1 changed files with 10 additions and 9 deletions

View File

@ -47,20 +47,21 @@
;;; extensions by JMG ;;; extensions by JMG
;;; takes list of interrupt/xxx's
;;; blocks until one of the interrupts in the set occurs
(define (wait-interrupt-set set pre-event) (define (wait-interrupt-set set pre-event)
(let ((event (next-event pre-event))) (let ((event (next-event pre-event)))
(if (memq (event-type event) set) (if (memq (event-type event) set)
event event
(wait-interrupt set event)))) (wait-interrupt-set set event))))
; would need placeholder-queue exported.. ; would need placeholder-queue exported..
;(define (placeholder-value-set? placeholder)
(define (placeholder-value-set? placeholder) ; (not (placeholder-queue placeholder)))
(not (placeholder-queue placeholder)))
(define (most-recent-event? event) (define (most-recent-event? event)
(eq? event most-recent-event)) (eq? event (most-recent-event)))
(define (nonblockwait-interrupt type event ) (define (nonblockwait-interrupt type event )
(general-nonblockwait-interrupt type event eq?)) (general-nonblockwait-interrupt type event eq?))
@ -68,10 +69,10 @@
(define (nonblockwait-interrupt-set set event ) (define (nonblockwait-interrupt-set set event )
(general-nonblockwait-interrupt set event memq)) (general-nonblockwait-interrupt set event memq))
(define (general-nonblockwait-interrupt waiting-for event compare) (define (general-nonblockwait-interrupt waiting-for pre-event compare?)
(if (most-recent-event? event) (if (most-recent-event? pre-event)
#f #f
(let ((event (next-event pre-event))) (let ((event (next-event pre-event)))
(if (compare (event-type event) waiting-for) (if (compare? (event-type event) waiting-for)
event event
(nonblockwait-interrupt type event))))) (general-nonblockwait-interrupt waiting-for event compare?)))))