summaryrefslogtreecommitdiff
path: root/rts/PrimOps.cmm
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-03-22 20:29:21 -0400
committerBen Gamari <ben@smart-cactus.org>2023-05-09 08:41:53 -0400
commit6b29154de6b63597553c5b69b9974c8838a7a80a (patch)
tree41dfdbc232b7421a7789f239e488a7895a8b3643 /rts/PrimOps.cmm
parent81cfefd2cfb9d97a19d8e543130f94248e667330 (diff)
downloadhaskell-6b29154de6b63597553c5b69b9974c8838a7a80a.tar.gz
Make atomicSwapMutVar# an inline primopwip/ioref-swap-xchg
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r--rts/PrimOps.cmm11
1 files changed, 0 insertions, 11 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 9e86a8e0a2..60d0dc2ccc 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -689,17 +689,6 @@ stg_newMutVarzh ( gcptr init )
return (mv);
}
-stg_atomicSwapMutVarzh ( gcptr mv, gcptr new )
- /* MutVar# s a -> a -> State# s -> (# State#, a #) */
-{
- W_ old;
- (old) = prim %xchgW(mv + SIZEOF_StgHeader + OFFSET_StgMutVar_var, new);
- if (GET_INFO(mv) == stg_MUT_VAR_CLEAN_info) {
- ccall dirty_MUT_VAR(BaseReg "ptr", mv "ptr", old "ptr");
- }
- return (old);
-}
-
// RRN: To support the "ticketed" approach, we return the NEW rather
// than old value if the CAS is successful. This is received in an
// opaque form in the Haskell code, preventing the compiler from