From 7ac80544a1e36b81c0b96bac9e7a94d6207058f9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 27 Apr 2021 16:59:25 +0100 Subject: [PATCH] Max sync2.Sema on windows be `i32` for the counter internally. --- core/sync/sync2/primitives_windows.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/sync/sync2/primitives_windows.odin b/core/sync/sync2/primitives_windows.odin index 0f8bce5ca..0eb6579a7 100644 --- a/core/sync/sync2/primitives_windows.odin +++ b/core/sync/sync2/primitives_windows.odin @@ -74,7 +74,7 @@ _cond_broadcast :: proc(c: ^Cond) { _Sema :: struct { - count: int, + count: i32, } _sema_wait :: proc(s: ^Sema) { @@ -96,7 +96,7 @@ _sema_wait :: proc(s: ^Sema) { } _sema_post :: proc(s: ^Sema, count := 1) { - atomic_add(&s.impl.count, count); + atomic_add(&s.impl.count, i32(count)); if count == 1 { win32.WakeByAddressSingle(&s.impl.count); } else {