Re: Read/Write memory barriers in D?

2017-08-13 Thread Igor via Digitalmars-d-learn
On Sunday, 13 August 2017 at 11:58:56 UTC, Daniel Kozak wrote: or maybe use core.atomic.atomicLoad and store with right https://dlang.org/phobos/core_atomic.html#.MemoryOrder On Sun, Aug 13, 2017 at 1:51 PM, Daniel Kozak wrote: maybe something like https://dlang.org/phobos/ core_bitop.html

Re: Read/Write memory barriers in D?

2017-08-13 Thread Daniel Kozak via Digitalmars-d-learn
or maybe use core.atomic.atomicLoad and store with right https://dlang.org/phobos/core_atomic.html#.MemoryOrder On Sun, Aug 13, 2017 at 1:51 PM, Daniel Kozak wrote: > maybe something like https://dlang.org/phobos/ > core_bitop.html#.volatileLoad and https://dlang.org/phobos/ > core_bitop.html#.v

Re: Read/Write memory barriers in D?

2017-08-13 Thread Daniel Kozak via Digitalmars-d-learn
maybe something like https://dlang.org/phobos/core_bitop.html#.volatileLoad and https://dlang.org/phobos/core_bitop.html#.volatileStore On Sun, Aug 13, 2017 at 1:37 PM, Igor via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I am converting a C code that uses this macro: > > #d

Read/Write memory barriers in D?

2017-08-13 Thread Igor via Digitalmars-d-learn
I am converting a C code that uses this macro: #define CompletePastWritesBeforeFutureWrites _WriteBarrier(); _mm_sfence() As far as I see core.atomic:atomicFence() is the equivalent of _mm_sfence() but I can't find what would be the equivalent of _WriteBarrier(). As far as I understand it is