summaryrefslogtreecommitdiff
path: root/rts/include
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-10 19:08:55 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-16 16:12:45 -0500
commitf8e901dcc090ef81723fb9f3d8ea0a1baac4cbc3 (patch)
tree65844b02fb748364a34c3d4dded6149ed44f1861 /rts/include
parent86f20258ab7dbfb56e323ee811e9eaef80b077d3 (diff)
downloadhaskell-f8e901dcc090ef81723fb9f3d8ea0a1baac4cbc3.tar.gz
rts: Encapsulate recent_activity access
This makes it easier to ensure that it is accessed using the necessary atomic operations.
Diffstat (limited to 'rts/include')
-rw-r--r--rts/include/stg/SMP.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/include/stg/SMP.h b/rts/include/stg/SMP.h
index c9ff736032..2c14c17081 100644
--- a/rts/include/stg/SMP.h
+++ b/rts/include/stg/SMP.h
@@ -35,7 +35,7 @@ void arm_atomic_spin_unlock(void);
#define SEQ_CST_STORE_ALWAYS(ptr,val) __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)
#define SEQ_CST_ADD_ALWAYS(ptr,val) __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)
#define SEQ_CST_SUB_ALWAYS(ptr,val) __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)
-
+#define SEQ_CST_XCHG_ALWAYS(ptr,val) __atomic_exchange_n(ptr, val, __ATOMIC_SEQ_CST);
#if defined(THREADED_RTS)