| ... | ... | @@ -15,7 +15,6 @@ |
| 15 | 15 | |
| 16 | 16 | const std = @import("../std.zig"); |
| 17 | 17 | const StaticResetEvent = @This(); |
| 18 | | const SpinLock = std.SpinLock; |
| 19 | 18 | const assert = std.debug.assert; |
| 20 | 19 | const os = std.os; |
| 21 | 20 | const time = std.time; |
| ... | ... | @@ -183,7 +182,7 @@ pub const AtomicEvent = struct { |
| 183 | 182 | timer = time.Timer.start() catch return error.TimedOut; |
| 184 | 183 | |
| 185 | 184 | while (@atomicLoad(u32, waiters, .Acquire) != WAKE) { |
| 186 | | SpinLock.yield(); |
| 185 | std.os.sched_yield() catch std.Thread.spinLoopHint(); |
| 187 | 186 | if (timeout) |timeout_ns| { |
| 188 | 187 | if (timer.read() >= timeout_ns) |
| 189 | 188 | return error.TimedOut; |
| ... | ... | @@ -294,7 +293,7 @@ pub const AtomicEvent = struct { |
| 294 | 293 | return @intToPtr(?windows.HANDLE, handle); |
| 295 | 294 | }, |
| 296 | 295 | LOADING => { |
| 297 | | SpinLock.yield(); |
| 296 | std.os.sched_yield() catch std.Thread.spinLoopHint(); |
| 298 | 297 | handle = @atomicLoad(usize, &event_handle, .Monotonic); |
| 299 | 298 | }, |
| 300 | 299 | else => { |