From 9cc20954a3fa8f6b4b4e1f3f9a18e528700a06f1 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 2 Aug 2020 15:07:52 +0100 Subject: [PATCH] Add sys/windows/synchronization.odin --- core/sync/channel_unix.odin | 6 +----- core/sys/windows/synchronization.odin | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 core/sys/windows/synchronization.odin diff --git a/core/sync/channel_unix.odin b/core/sync/channel_unix.odin index 6fe84f2d3..6ae428328 100644 --- a/core/sync/channel_unix.odin +++ b/core/sync/channel_unix.odin @@ -11,10 +11,6 @@ raw_channel_wait_queue_signal :: proc(q: ^Raw_Channel_Wait_Queue) { // stub } - raw_channel_wait_queue_broadcast :: proc(q: ^Raw_Channel_Wait_Queue) { - for x := q^; x != nil; x = x.next { - q^ = x.next; - // stub - } + // stub } diff --git a/core/sys/windows/synchronization.odin b/core/sys/windows/synchronization.odin new file mode 100644 index 000000000..6f864de03 --- /dev/null +++ b/core/sys/windows/synchronization.odin @@ -0,0 +1,10 @@ +package sys_windows + +foreign import Synchronization "system:Synchronization.lib" + +@(default_calling_convention="c") +foreign Synchronization { + WaitOnAddress :: proc(Address: PVOID, CompareAddress: PVOID, AddressSize: SIZE_T, dwMilliseconds: DWORD) -> BOOL --- + WakeByAddressSingle :: proc(Address: PVOID) --- + WakeByAddressAll :: proc(Address: PVOID) --- +}