Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 1bd60a7

Browse files
committed
Add order to atomicFence.
Fixes issue 20106
1 parent 67aa4f6 commit 1bd60a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/atomic.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ in (atomicPtrIsProperlyAligned(here), "Argument `here` is not properly aligned")
389389
* that all loads and stores before a call to this function are executed before any
390390
* loads and stores after the call.
391391
*/
392-
void atomicFence() nothrow @nogc @safe
392+
void atomicFence(MemoryOrder order = MemoryOrder.seq)() nothrow @nogc @safe
393393
{
394-
core.internal.atomic.atomicFence();
394+
core.internal.atomic.atomicFence!order();
395395
}
396396

397397
/**
@@ -404,7 +404,7 @@ void atomicFence() nothrow @nogc @safe
404404
* Returns:
405405
* The result of the operation.
406406
*/
407-
T atomicOp(string op, T, V1)(ref shared T val, V1 mod) pure nothrow @nogc @safe
407+
TailShared!T atomicOp(string op, T, V1)(ref shared T val, V1 mod) pure nothrow @nogc @safe
408408
if (__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod")))
409409
in (atomicValueIsProperlyAligned(val))
410410
{

0 commit comments

Comments
 (0)