diff --git a/racket/src/cs/schemified/thread.scm b/racket/src/cs/schemified/thread.scm index 9552c3f24d..0cfb010f5d 100644 --- a/racket/src/cs/schemified/thread.scm +++ b/racket/src/cs/schemified/thread.scm @@ -13861,13 +13861,13 @@ (|#%app| host:fork-place (lambda () - (call-in-another-main-thread - orig-cust_0 - (lambda () - (begin - (unsafe-place-local-set! - cell.1$2 - new-place_0) + (begin + (unsafe-place-local-set! + cell.1$2 + new-place_0) + (call-in-another-main-thread + orig-cust_0 + (lambda () (begin (set-place-id! new-place_0 @@ -14448,7 +14448,7 @@ (define make-message-queue (lambda () (let ((app_0 (|#%app| host:make-mutex))) - (message-queue4.1 app_0 '() '() (box #f) hash2725 (box #f))))) + (message-queue4.1 app_0 '() '() (box #f) hash2610 (box #f))))) (define enqueue! (lambda (mq_0 msg_0 wk_0) (let ((lock_0 (message-queue-lock mq_0))) @@ -14463,7 +14463,7 @@ (cons msg_0 (message-queue-rev-q mq_0))) (let ((waiters_0 (message-queue-waiters mq_0))) (begin - (set-message-queue-waiters! mq_0 hash2725) + (set-message-queue-waiters! mq_0 hash2610) (set-box! (message-queue-out-key-box mq_0) wk_0) (set-box! (message-queue-in-key-box mq_0) #f) (|#%app| host:mutex-release lock_0) diff --git a/racket/src/thread/place.rkt b/racket/src/thread/place.rkt index b16b9af7f3..7c2b5f5ce2 100644 --- a/racket/src/thread/place.rkt +++ b/racket/src/thread/place.rkt @@ -90,11 +90,11 @@ (define host-thread (host:fork-place (lambda () + (set! current-place new-place) (start-implicit-atomic-mode) (call-in-another-main-thread orig-cust (lambda () - (set! current-place new-place) (set-place-id! new-place (get-pthread-id)) (set-place-host-roots! new-place (host:current-place-roots)) (current-thread-group root-thread-group) @@ -155,6 +155,7 @@ (place-has-activity! p)) (host:mutex-release (place-lock p)))) +;; called with place's lock held or for the current place (define (place-has-activity! p) (set-box! (place-activity-canary p) #t) (sandman-wakeup (place-wakeup-handle p))) @@ -277,7 +278,7 @@ '() '() (box #f) - #hash() + #hasheq() (box #f))) (define (enqueue! mq msg wk) @@ -286,7 +287,7 @@ (host:mutex-acquire lock) (set-message-queue-rev-q! mq (cons msg (message-queue-rev-q mq))) (define waiters (message-queue-waiters mq)) - (set-message-queue-waiters! mq '#hash()) + (set-message-queue-waiters! mq '#hasheq()) (set-box! (message-queue-out-key-box mq) wk) (set-box! (message-queue-in-key-box mq) #f) (host:mutex-release lock) diff --git a/racket/src/thread/semaphore.rkt b/racket/src/thread/semaphore.rkt index 75c85b15db..7968a6f255 100644 --- a/racket/src/thread/semaphore.rkt +++ b/racket/src/thread/semaphore.rkt @@ -97,6 +97,7 @@ ;; In atomic mode (define (semaphore-post-all/atomic s) + (assert-atomic-mode) (set-semaphore-count! s +inf.0) (queue-remove-all! s