runtime: add critical-section fallbacks for atomic And and Or

This commit is contained in:
rdon-key
2026-07-23 14:06:37 +09:00
committed by Ron Evans
parent 9c2eafce6f
commit 0c68e1215e
4 changed files with 204 additions and 0 deletions
@@ -145,6 +145,8 @@ func __atomic_{{$opname}}_fetch_{{$bytes}}(ptr *{{$type}}, value {{$type}}, orde
{{template "cas" .}}
{{template "swap" .}}
{{template "rmw" (tuple "add" . false "new = old + value")}}
{{template "rmw" (tuple "and" . false "new = old & value")}}
{{template "rmw" (tuple "or" . false "new = old | value")}}
{{- end}}
{{template "atomics" 2 -}}