Changes between Version 4 and Version 5 of AtomicPrimops


Ignore:
Timestamp:
Jun 6, 2014 10:45:21 AM (9 months ago)
Author:
tibbe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AtomicPrimops

    v4 v5  
    88 
    99{{{#!haskell 
    10 atomicReadIntArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #) 
    11 atomicWriteIntArray# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s 
    12 atomicFetchAddIntArray# 
     10readIntArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #) 
     11writeIntArray# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s 
     12fetchAddIntArray# 
    1313    :: MutableByteArray#     -- Array to modify 
    1414    -> Int#                  -- Index, in words 
     
    1616    -> State# s 
    1717    -> (# State# s, Int# #)  -- Value held previously 
    18 atomicFetchSubIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    19 atomicFetchOrIntArray#  :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    20 atomicFetchXorIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    21 atomicFetchAndIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     18fetchSubIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     19fetchOrIntArray#  :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     20fetchXorIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     21fetchAndIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    2222casIntArray# :: MutableByteArray# s -> Int# -> Int# -> Int# -> State# s -> (#State# s, Int##) 
    2323}}} 
    2424 
    25 `atomicFetchAddIntArray#` and `casIntArray#` already exist (but are implemented as out-of-line primops.) 
     25`fetchAddIntArray#` and `casIntArray#` already exist (but are implemented as out-of-line primops.) 
    2626 
    2727== Implementation