diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-09-10 19:04:44 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-09-11 08:39:23 -0400 |
| commit | b1db33b519bf52e2d0e6e42ca9daccc7470d6b8b (patch) | |
| tree | 6434a6aefee3203952d61974655c702025b0ab3b /core/sync | |
| parent | a1435a6a904b2eb2b154a463c5d60f6c1f55abbc (diff) | |
Add `cpu_relax` to `sync.auto_reset_event_signal`
Diffstat (limited to 'core/sync')
| -rw-r--r-- | core/sync/extended.odin | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/sync/extended.odin b/core/sync/extended.odin index 0971516a3..0b1f79df2 100644 --- a/core/sync/extended.odin +++ b/core/sync/extended.odin @@ -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) |