JuliaConcurrent / UnsafeAtomics.jl

MIT License
4 stars 1 forks source link

Properly support `fence` #16

Open maleadt opened 9 hours ago

maleadt commented 9 hours ago

UnsafeAtomics.jl now relies on Base for fence: https://github.com/JuliaConcurrent/UnsafeAtomics.jl/blob/2eaec48118d3719da335d1dcd9d0e24e5f4739e4/ext/UnsafeAtomicsLLVM/atomics.jl#L196

That seems wrong, fence has been renamed to Threads.atomic_fence now (without an order argument): https://github.com/JuliaLang/julia/blob/447dc2d8e9a71669c6a3f62ff8ac71054c811a94/base/atomics.jl#L465-L468

We should probably add fence to the interface here, and add a proper implementation that supports arbitrary orderings and synchronization scopes.