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