mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-05 18:24:06 +00:00
Add cpu_relax to sync.auto_reset_event_signal
This commit is contained in:
@@ -233,6 +233,7 @@ auto_reset_event_signal :: proc "contextless" (e: ^Auto_Reset_Event) {
|
||||
if _, ok := atomic_compare_exchange_weak_explicit(&e.status, old_status, new_status, .Release, .Relaxed); ok {
|
||||
break
|
||||
}
|
||||
cpu_relax()
|
||||
}
|
||||
if old_status < 0 {
|
||||
sema_post(&e.sema)
|
||||
|
||||
Reference in New Issue
Block a user