Changes between Version 1 and Version 2 of AtomicPrimops


Ignore:
Timestamp:
May 4, 2014 10:13:08 AM (13 months ago)
Author:
tibbe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AtomicPrimops

    v1 v2  
    1010atomicReadIntArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #) 
    1111atomicWriteIntArray# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s 
    12 atomicReadAddIntArray# 
     12atomicFetchAddIntArray# 
    1313    :: MutableByteArray#     -- Array to modify 
    1414    -> Int#                  -- Index, in words 
     
    1616    -> State# s 
    1717    -> (# State# s, Int# #)  -- Value held previously 
    18 atomicReadAddIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    19 atomicReadSubIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    20 atomicReadOrIntArray#  :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    21 atomicReadXorIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
    22 atomicReadAndIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     18atomicFetchAddIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     19atomicFetchSubIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     20atomicFetchOrIntArray#  :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     21atomicFetchXorIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     22atomicFetchAndIntArray# :: MutableByteArray# -> Int# -> Int# -> State# s -> (# State# s, Int# #) 
     23casIntArray# :: MutableByteArray# s -> Int# -> Int# -> Int# -> State# s -> (#State# s, Int##) 
    2324}}} 
     25 
     26`atomicFetchAddIntArray#` and `casIntArray#` already exist (but are implemented as out-of-line primops.) 
    2427 
    2528== Implementation