| author | |
| committer | |
| log | ad301d687a2c75c1bf692a945b536765055c94f7 |
| tree | 96f6ac75f8dcbd0e03674613526469d489d376d4 |
| parent | 9e1aeda3bf6e379ef8572d92eca1644175ef69f5 |
2 files changed, 6 insertions(+), 6 deletions(-)
lib/std/Thread/Condition.zig+3-3| ... | ... | @@ -40,7 +40,7 @@ pub const WindowsCondition = struct { |
| 40 | 40 | cond: windows.CONDITION_VARIABLE = windows.CONDITION_VARIABLE_INIT, |
| 41 | 41 | |
| 42 | 42 | pub fn wait(cond: *WindowsCondition, mutex: *Mutex) void { |
| 43 | const rc = windows.SleepConditionVariableSRW( | |
| 43 | const rc = windows.kernel32.SleepConditionVariableSRW( | |
| 44 | 44 | &cond.cond, |
| 45 | 45 | &mutex.srwlock, |
| 46 | 46 | windows.INFINITE, |
| ... | ... | @@ -50,11 +50,11 @@ pub const WindowsCondition = struct { |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | pub fn signal(cond: *WindowsCondition) void { |
| 53 | windows.WakeConditionVariable(&cond.cond); | |
| 53 | windows.kernel32.WakeConditionVariable(&cond.cond); | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | pub fn broadcast(cond: *WindowsCondition) void { |
| 57 | windows.WakeAllConditionVariable(&cond.cond); | |
| 57 | windows.kernel32.WakeAllConditionVariable(&cond.cond); | |
| 58 | 58 | } |
| 59 | 59 | }; |
| 60 | 60 |
lib/std/Thread/Mutex.zig+3-3| ... | ... | @@ -259,12 +259,12 @@ const WindowsMutex = struct { |
| 259 | 259 | mutex: *WindowsMutex, |
| 260 | 260 | |
| 261 | 261 | pub fn release(held: Held) void { |
| 262 | windows.ReleaseSRWLockExclusive(&held.mutex.srwlock); | |
| 262 | windows.kernel32.ReleaseSRWLockExclusive(&held.mutex.srwlock); | |
| 263 | 263 | } |
| 264 | 264 | }; |
| 265 | 265 | |
| 266 | 266 | pub fn tryAcquire(m: *WindowsMutex) ?Held { |
| 267 | if (windows.TryAcquireSRWLockExclusive(&m.srwlock) != windows.FALSE) { | |
| 267 | if (windows.kernel32.TryAcquireSRWLockExclusive(&m.srwlock) != windows.FALSE) { | |
| 268 | 268 | return Held{ .mutex = m }; |
| 269 | 269 | } else { |
| 270 | 270 | return null; |
| ... | ... | @@ -272,7 +272,7 @@ const WindowsMutex = struct { |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | pub fn acquire(m: *WindowsMutex) Held { |
| 275 | windows.AcquireSRWLockExclusive(&m.srwlock); | |
| 275 | windows.kernel32.AcquireSRWLockExclusive(&m.srwlock); | |
| 276 | 276 | return Held{ .mutex = m }; |
| 277 | 277 | } |
| 278 | 278 | }; |