Skip to content

Commit

Permalink
Add memory barrier to Mutex#unlock on aarch64 (#14272)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaskins authored Feb 10, 2024
1 parent a3e8d12 commit db67d71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mutex.cr
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class Mutex
@mutex_fiber = nil
end

{% if flag?(:aarch64) %}
Atomic::Ops.fence :sequentially_consistent, false
{% end %}
@state.lazy_set(0)

if @queue_count.get == 0
Expand Down

0 comments on commit db67d71

Please sign in to comment.