atomicWriteIORef

Carter Schonwald carter.schonwald at gmail.com
Fri Jun 22 22:59:26 UTC 2018


I conjecture, but might be wrong, that on a number of architectures, there
isn't a native  CAS  plus memory ordering stuff? eg
https://en.wikipedia.org/wiki/Memory_ordering

on the other hand, it might be a simple oversight (in which case good
catch!)

i dont have SMP memory models properly digested well enough to say which
though

On Fri, Jun 22, 2018 at 2:43 AM David Feuer <david.feuer at gmail.com> wrote:

> Currently, atomicWriteIORef is implemented using atomicModifyIORef. That
> seems pretty heavy for the job, allocating closures and forcing thunks. Is
> there a reason not to do it with casMutVar#?
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180622/98174ace/attachment.html>


More information about the ghc-devs mailing list