Skip to content

Commit 2cbcfe9

Browse files
committed
Fix fence usage
1 parent 8f05136 commit 2cbcfe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/atomics.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ end
191191
if sizeof(T) == 0
192192
# Mimicking what `Core.Intrinsics.atomic_pointerset` generates.
193193
# See: https://github.com/JuliaLang/julia/blob/v1.7.2/src/cgutils.cpp#L1570-L1572
194-
is_stronger_than_monotonic(order) || return :ptr
195194
return quote
196-
Core.Intrinsics.fence($(QuoteNode(order)))
195+
is_stronger_than_monotonic(_valueof(order)) || return :ptr
196+
Core.Intrinsics.atomic_fence(_valueof(order))
197197
ptr
198198
end
199199
end

0 commit comments

Comments
 (0)