Explorar o código

Add sys/windows/synchronization.odin

gingerBill %!s(int64=5) %!d(string=hai) anos
pai
achega
9cc20954a3
Modificáronse 2 ficheiros con 11 adicións e 5 borrados
  1. 1 5
      core/sync/channel_unix.odin
  2. 10 0
      core/sys/windows/synchronization.odin

+ 1 - 5
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
 }

+ 10 - 0
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) ---
+}