August 29, 2014 [Issue 13395] New: Shared arrays must be loaded atomically | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: andrei@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. -- |
Copyright © 1999-2021 by the D Language Foundation