(let loop ()
;; Sleep when not realized?, not animate?, or obscured.
- (without-interrupts
+ (with-thread-events-blocked
(lambda ()
(let ((visibility (glxgears-demo-visibility widget)))
(if (or (not (glxgears-demo-realized? widget))
(init))
(define (with-gl-library thunk)
- (with-thread-mutex-locked gl-library-mutex thunk))
+ (with-thread-mutex-lock gl-library-mutex thunk))
(define (guarantee-current operator)
(if (not (eq? (current-thread)
with-thread-mutex-unlocked
with-thread-timer-stopped
(without-interruption with-thread-events-blocked)
- without-preemption
without-thread-mutex-lock
yield-current-thread)
(import (runtime population)
(set-interrupt-enables! interrupt-mask)
value)))
-(define (without-preemption thunk)
- (let* ((thread (current-thread))
- (state (thread/execution-state thread)))
- (set-thread/execution-state! thread 'RUNNING-WITHOUT-PREEMPTION)
- (let ((value (thunk)))
- (set-thread/execution-state! thread state)
- value)))
-
(define (with-obarray-lock thunk)
;; Serialize with myriad parts of the microcode that hack the
;; obarray element of the fixed-objects vector.
(if enable-smp?
- (without-preemption
+ (without-interrupts
(lambda ()
(if (not (eq? #t ((ucode-primitive smp-lock-obarray 1) #t)))
(outf-error "\nwith-obarray-lock: lock failed\n"))
(if (not (eq? #t ((ucode-primitive smp-lock-obarray 1) #f)))
(outf-error "\nwith-obarray-lock: unlock failed\n"))
value)))
- (let* ((mask (set-interrupt-enables! interrupt-mask/gc-ok))
- (value (thunk)))
- (set-interrupt-enables! mask)
- value)))
+ (without-interrupts thunk)))
(define (threads-list)
(map-over-population thread-population (lambda (thread) thread)))