From 1fe27ce40ecedfc35e9132e3cbee054dff14f2f7 Mon Sep 17 00:00:00 2001 From: Matt Page Date: Tue, 13 Feb 2024 16:20:01 -0800 Subject: [PATCH] Use sequential consistency for operations on state --- Modules/_threadmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index fa28a52f75efa3..6a539e7cd64524 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -85,13 +85,13 @@ typedef struct { static inline int get_thread_handle_state(ThreadHandleObject *handle) { - return _Py_atomic_load_int_relaxed(&handle->state); + return _Py_atomic_load_int(&handle->state); } static inline void set_thread_handle_state(ThreadHandleObject *handle, ThreadHandleState state) { - _Py_atomic_store_int_relaxed(&handle->state, state); + _Py_atomic_store_int(&handle->state, state); } static ThreadHandleObject*