
5 May
2014
5 May
'14
3:33 p.m.
On 04/05/14 11:10, Johan Tibell wrote:
I found myself needing atomic operations on basic, mutable numeric values. I wrote a short design doc that I'd like feedback on:
https://ghc.haskell.org/trac/ghc/wiki/AtomicPrimops
I will try to implement these for 7.10.
Right now, all CmmUnsafeForeignCalls (this includes CallishMachOps) are assumed to read and clobber arbitrary memory, so we won't commute reads or writes past them. We could relax this in the future, so the best thing to do would be to write down what semantics you expect (hah, I realise how difficult this is! An informal description will have to suffice.) Cheers, Simon