jsut small fixes and comments
This commit is contained in:
parent
41c9c192b5
commit
7927367f49
|
@ -47,20 +47,21 @@
|
|||
|
||||
;;; 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)
|
||||
(let ((event (next-event pre-event)))
|
||||
(if (memq (event-type event) set)
|
||||
event
|
||||
(wait-interrupt set event))))
|
||||
(wait-interrupt-set set event))))
|
||||
|
||||
|
||||
; would need placeholder-queue exported..
|
||||
|
||||
(define (placeholder-value-set? placeholder)
|
||||
(not (placeholder-queue placeholder)))
|
||||
;(define (placeholder-value-set? placeholder)
|
||||
; (not (placeholder-queue placeholder)))
|
||||
|
||||
(define (most-recent-event? event)
|
||||
(eq? event most-recent-event))
|
||||
(eq? event (most-recent-event)))
|
||||
|
||||
(define (nonblockwait-interrupt type event )
|
||||
(general-nonblockwait-interrupt type event eq?))
|
||||
|
@ -68,10 +69,10 @@
|
|||
(define (nonblockwait-interrupt-set set event )
|
||||
(general-nonblockwait-interrupt set event memq))
|
||||
|
||||
(define (general-nonblockwait-interrupt waiting-for event compare)
|
||||
(if (most-recent-event? event)
|
||||
(define (general-nonblockwait-interrupt waiting-for pre-event compare?)
|
||||
(if (most-recent-event? pre-event)
|
||||
#f
|
||||
(let ((event (next-event pre-event)))
|
||||
(if (compare (event-type event) waiting-for)
|
||||
(if (compare? (event-type event) waiting-for)
|
||||
event
|
||||
(nonblockwait-interrupt type event)))))
|
||||
(general-nonblockwait-interrupt waiting-for event compare?)))))
|
||||
|
|
Loading…
Reference in New Issue