deregister-all-events
deregister-io-descriptor-events
deregister-io-thread-event
+ deregister-time-event
deregister-timer-event
detach-thread
exit-current-thread
other-running-threads?
permanently-register-io-thread-event
register-io-thread-event
+ register-time-event
register-timer-event
restart-thread
set-thread-timer-interval!
next)
(define (register-timer-event interval event)
- (let ((time (+ (real-time-clock) interval)))
+ (register-time-event (+ (real-time-clock) interval) event))
+
+(define (register-time-event time event)
(let ((new-record (make-timer-record time (current-thread) event #f)))
(without-interrupts
(lambda ()
(set-timer-record/event! record #f)
(%signal-thread-event thread event)))))
\f
-(define (deregister-timer-event registration)
+(define (deregister-time-event registration)
(if (not (timer-record? registration))
(error:wrong-type-argument registration "timer event registration"
'DEREGISTER-TIMER-EVENT))
(loop next record)))))
(%maybe-toggle-thread-timer))))
+(define-integrable (deregister-timer-event registration)
+ (deregister-time-event registration))
+
(define-integrable (threads-pending-timer-events?)
timer-records)