Adding atomic primops
Simon Marlow
marlowsd at gmail.com
Mon May 5 19:33:51 UTC 2014
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
More information about the ghc-devs
mailing list