mirror of
https://github.com/ziglang/zig.git
synced 2026-02-19 15:58:50 +00:00
implement os.abort and panic for cuda
This commit is contained in:
parent
419855c475
commit
24c749473a
@ -833,6 +833,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr
|
||||
// Didn't have boot_services, just fallback to whatever.
|
||||
std.os.abort();
|
||||
},
|
||||
.cuda => std.os.abort(),
|
||||
else => {
|
||||
const first_trace_addr = ret_addr orelse @returnAddress();
|
||||
std.debug.panicImpl(error_return_trace, first_trace_addr, msg);
|
||||
|
||||
@ -500,10 +500,15 @@ pub fn abort() noreturn {
|
||||
@breakpoint();
|
||||
exit(1);
|
||||
}
|
||||
if (builtin.os.tag == .cuda) {
|
||||
@"llvm.trap"();
|
||||
}
|
||||
|
||||
system.abort();
|
||||
}
|
||||
|
||||
extern fn @"llvm.trap"() noreturn;
|
||||
|
||||
pub const RaiseError = UnexpectedError;
|
||||
|
||||
pub fn raise(sig: u8) RaiseError!void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user