diff options
author | Tamar Christina <tamar@zhox.com> | 2019-06-01 11:20:39 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-14 09:07:44 -0400 |
commit | c0e6dee99242eff08420176a36d77b715972f1f2 (patch) | |
tree | 4899be6a2dc500f79b9f67300362ba8a702a6b7a /includes | |
parent | a31218f7737a65b6333ec7905e88dc094703f025 (diff) | |
download | haskell-c0e6dee99242eff08420176a36d77b715972f1f2.tar.gz |
winio: Add Atomic Exchange PrimOp and implement Atomic Ptr exchanges.
The initial version was rewritten by Tamar Christina.
It was rewritten in large parts by Andreas Klebinger.
Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
Diffstat (limited to 'includes')
-rw-r--r-- | includes/stg/Prim.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/stg/Prim.h b/includes/stg/Prim.h index badbde4dfa..5f432b6f9b 100644 --- a/includes/stg/Prim.h +++ b/includes/stg/Prim.h @@ -50,6 +50,10 @@ void hs_atomicwrite8(StgWord x, StgWord val); void hs_atomicwrite16(StgWord x, StgWord val); void hs_atomicwrite32(StgWord x, StgWord val); void hs_atomicwrite64(StgWord x, StgWord64 val); +StgWord hs_xchg8(StgWord x, StgWord val); +StgWord hs_xchg16(StgWord x, StgWord val); +StgWord hs_xchg32(StgWord x, StgWord val); +StgWord hs_xchg64(StgWord x, StgWord val); /* libraries/ghc-prim/cbits/bswap.c */ StgWord16 hs_bswap16(StgWord16 x); |