| ... | ... | @@ -14,10 +14,13 @@ const windows = os.windows; |
| 14 | 14 | pub const ResetEvent = struct { |
| 15 | 15 | os_event: OsEvent, |
| 16 | 16 | |
| 17 | | pub const OsEvent = if (builtin.single_threaded) DebugEvent else switch (builtin.os) { |
| 18 | | .windows => AtomicEvent, |
| 19 | | else => if (builtin.link_libc) PosixEvent else AtomicEvent, |
| 20 | | }; |
| 17 | pub const OsEvent = |
| 18 | if (builtin.single_threaded) |
| 19 | DebugEvent |
| 20 | else if (builtin.link_libc and builtin.os != .windows and builtin.os != .linux) |
| 21 | PosixEvent |
| 22 | else |
| 23 | AtomicEvent; |
| 21 | 24 | |
| 22 | 25 | pub fn init() ResetEvent { |
| 23 | 26 | return ResetEvent{ .os_event = OsEvent.init() }; |