diff options
author | John Hawthorn <[email protected]> | 2025-05-14 18:28:53 -0700 |
---|---|---|
committer | John Hawthorn <[email protected]> | 2025-05-20 09:56:31 -0700 |
commit | 05e0e7223acbc9ab223dd8f4b342d5eb6d3ae8c7 () | |
tree | 15c3ed684845a6828e0935e87c6d90c2a3c46aec /thread.c | |
parent | cd15cc250fa7dc6482833327728eeff641d2e41d (diff) |
Use atomic load to read interrupt mask
Notes: Merged: https://.com/ruby/ruby/pull/13357
-rw-r--r-- | thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2465,8 +2465,9 @@ threadptr_get_interrupts(rb_thread_t *th) rb_atomic_t interrupt; rb_atomic_t old; do { - interrupt = ec->interrupt_flag; old = ATOMIC_CAS(ec->interrupt_flag, interrupt, interrupt & ec->interrupt_mask); } while (old != interrupt); return interrupt & (rb_atomic_t)~ec->interrupt_mask; |