| ... | @@ -280,7 +280,7 @@ const AtomicEvent = struct { | ... | @@ -280,7 +280,7 @@ const AtomicEvent = struct { |
| 280 | const WindowsFutex = struct { | 280 | const WindowsFutex = struct { |
| 281 | pub fn wake(waiters: *u32, wake_count: u32) void { | 281 | pub fn wake(waiters: *u32, wake_count: u32) void { |
| 282 | const handle = getEventHandle() orelse return SpinFutex.wake(waiters, wake_count); | 282 | const handle = getEventHandle() orelse return SpinFutex.wake(waiters, wake_count); |
| 283 | const key = @ptrCast(*const c_void, ptr); | 283 | const key = @ptrCast(*const c_void, waiters); |
| 284 | | 284 | |
| 285 | var waiting = wake_count; | 285 | var waiting = wake_count; |
| 286 | while (waiting != 0) : (waiting -= 1) { | 286 | while (waiting != 0) : (waiting -= 1) { |
| ... | @@ -291,7 +291,7 @@ const AtomicEvent = struct { | ... | @@ -291,7 +291,7 @@ const AtomicEvent = struct { |
| 291 | | 291 | |
| 292 | pub fn wait(waiters: *u32, timeout: ?u64) !void { | 292 | pub fn wait(waiters: *u32, timeout: ?u64) !void { |
| 293 | const handle = getEventHandle() orelse return SpinFutex.wait(waiters, timeout); | 293 | const handle = getEventHandle() orelse return SpinFutex.wait(waiters, timeout); |
| 294 | const key = @ptrCast(*const c_void, ptr); | 294 | const key = @ptrCast(*const c_void, waiters); |
| 295 | | 295 | |
| 296 | // NT uses timeouts in units of 100ns with negative value being relative | 296 | // NT uses timeouts in units of 100ns with negative value being relative |
| 297 | var timeout_ptr: ?*windows.LARGE_INTEGER = null; | 297 | var timeout_ptr: ?*windows.LARGE_INTEGER = null; |