| ... | ... | @@ -575,22 +575,12 @@ pub fn abort() noreturn { |
| 575 | 575 | raise(SIG.KILL) catch {}; |
| 576 | 576 | exit(127); // Pid 1 might not be signalled in some containers. |
| 577 | 577 | } |
| 578 | | if (builtin.os.tag == .uefi) { |
| 579 | | exit(0); // TODO choose appropriate exit code |
| 580 | | } |
| 581 | | if (builtin.os.tag == .wasi) { |
| 582 | | exit(1); |
| 583 | | } |
| 584 | | if (builtin.os.tag == .cuda) { |
| 585 | | // TODO: introduce `@trap` instead of abusing https://github.com/ziglang/zig/issues/2291 |
| 586 | | @"llvm.trap"(); |
| 578 | switch (builtin.os.tag) { |
| 579 | .uefi, .wasi, .cuda => @trap(), |
| 580 | else => system.abort(), |
| 587 | 581 | } |
| 588 | | |
| 589 | | system.abort(); |
| 590 | 582 | } |
| 591 | 583 | |
| 592 | | extern fn @"llvm.trap"() noreturn; |
| 593 | | |
| 594 | 584 | pub const RaiseError = UnexpectedError; |
| 595 | 585 | |
| 596 | 586 | pub fn raise(sig: u8) RaiseError!void { |