diff options
author | Johan Tibell <johan.tibell@gmail.com> | 2014-06-09 11:43:21 +0200 |
---|---|---|
committer | Johan Tibell <johan.tibell@gmail.com> | 2014-06-24 19:06:53 +0200 |
commit | d8abf85f8ca176854e9d5d0b12371c4bc402aac3 (patch) | |
tree | 9542f2b8a7ee9b9759396e4172ad5fc4ce1d2f3c /rts/PrimOps.cmm | |
parent | a4a79b5a04658ac542b1e07a6975b488fd589441 (diff) | |
download | haskell-d8abf85f8ca176854e9d5d0b12371c4bc402aac3.tar.gz |
Add more primops for atomic ops on byte arrays
Summary:
Add more primops for atomic ops on byte arrays
Adds the following primops:
* atomicReadIntArray#
* atomicWriteIntArray#
* fetchSubIntArray#
* fetchOrIntArray#
* fetchXorIntArray#
* fetchAndIntArray#
Makes these pre-existing out-of-line primops inline:
* fetchAddIntArray#
* casIntArray#
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 4d7baca824..5f04a6d732 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -151,18 +151,6 @@ stg_casIntArrayzh( gcptr arr, W_ ind, W_ old, W_ new ) } -stg_fetchAddIntArrayzh( gcptr arr, W_ ind, W_ incr ) -/* MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, Int# #) */ -{ - W_ p, h; - - p = arr + SIZEOF_StgArrWords + WDS(ind); - (h) = ccall atomic_inc(p, incr); - - return(h); -} - - stg_newArrayzh ( W_ n /* words */, gcptr init ) { W_ words, size, p; |