[Issue 13395] New: Shared arrays must be loaded atomically
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Aug 28 16:00:16 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13395
Issue ID: 13395
Summary: Shared arrays must be loaded atomically
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: andrei at erdani.com
D assumes N-bit machines support 2N-atomic loads, which is the case for all
modern processors. The compiler should generate code to load and store all
built-in shared slices atomically.
Apparently on i64 the only way to do so is by using CMPXCHG16B
(http://stackoverflow.com/questions/4099002/x86-128-bit-atomic-ops). The
instruction is supported by the front-end too.
Also core.atomic should support atomicLoad() for values that are 128-bit on
64-bit models.
--
More information about the Digitalmars-d-bugs
mailing list