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)))