From 50a68b9d8c0d8d88f27230cfce9181d68532a3ff Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 12 May 2026 13:52:25 -0700 Subject: [PATCH] adjust internal definition of sync barrier type to match windows --- src/win32/base/win32_base.c | 5 +++++ src/win32/base/win32_base.h | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/win32/base/win32_base.c b/src/win32/base/win32_base.c index 5db1ef65..62d0bdbf 100644 --- a/src/win32/base/win32_base.c +++ b/src/win32/base/win32_base.c @@ -1772,6 +1772,11 @@ w32_entry_point_caller(int argc, WCHAR **wargv) w32_InitializeSynchronizationBarrier_func = (W32_InitializeSynchronizationBarrier_Type *)GetProcAddress(module, "InitializeSynchronizationBarrier"); w32_DeleteSynchronizationBarrier_func = (W32_DeleteSynchronizationBarrier_Type *)GetProcAddress(module, "DeleteSynchronizationBarrier"); w32_EnterSynchronizationBarrier_func = (W32_EnterSynchronizationBarrier_Type *)GetProcAddress(module, "EnterSynchronizationBarrier"); + if(w32_InitializeSynchronizationBarrier_func == 0) + { + w32_DeleteSynchronizationBarrier_func = 0; + w32_EnterSynchronizationBarrier_func = 0; + } FreeLibrary(module); } diff --git a/src/win32/base/win32_base.h b/src/win32/base/win32_base.h index fe0e7957..a70812e1 100644 --- a/src/win32/base/win32_base.h +++ b/src/win32/base/win32_base.h @@ -56,11 +56,15 @@ W32_EntityKind; typedef struct W32_SYNCHRONIZATION_BARRIER W32_SYNCHRONIZATION_BARRIER; struct W32_SYNCHRONIZATION_BARRIER { - U32 reserved_0; - U32 reserved_1; + DWORD reserved_0; + DWORD reserved_1; +#if ARCH_32BIT + U32 reserved_2[2]; +#else U64 reserved_2[2]; - U32 reserved_3; - U32 reserved_4; +#endif + DWORD reserved_3; + DWORD reserved_4; }; typedef struct W32_Entity W32_Entity;