From a2a456cd2dea225a8840907d9c0e07e7c258c49a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 6 Dec 2020 06:42:21 -0700 Subject: [PATCH] Chez Scheme: fix a test for weak memory ordering --- racket/src/ChezScheme/mats/thread.ms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/racket/src/ChezScheme/mats/thread.ms b/racket/src/ChezScheme/mats/thread.ms index 51988677a7..2eb9a52f44 100644 --- a/racket/src/ChezScheme/mats/thread.ms +++ b/racket/src/ChezScheme/mats/thread.ms @@ -1438,7 +1438,9 @@ (if (odd? i) (let loop () (unless (ftype-lock! A (y) a) (printf "waiting\n") (loop))) (ftype-spin-lock! A (y) a)) + (memory-order-acquire) (ftype-set! A (x) a ((if (odd? n) + -) (ftype-ref A (x) a) 1.0)) + (memory-order-release) (ftype-unlock! A (y) a)))))) (let loop () (if (equal? (length ls) n)