Removes proc_raise from WASI implementation

This commit is contained in:
Colin Svingen 2020-01-05 20:30:28 -05:00 committed by Andrew Kelley
parent c30106c906
commit 4e6ad8efd9
3 changed files with 2 additions and 11 deletions

View File

@ -416,7 +416,7 @@ pub const CallOptions = struct {
/// therefore must be kept in sync with the compiler implementation.
pub const TestFn = struct {
name: []const u8,
func: fn()anyerror!void,
func: fn () anyerror!void,
};
/// This function type is used by the Zig language code generation and
@ -443,8 +443,7 @@ pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn
},
.wasi => {
std.debug.warn("{}", .{msg});
_ = std.os.wasi.proc_raise(std.os.wasi.SIGABRT);
unreachable;
std.os.abort();
},
.uefi => {
// TODO look into using the debug info and logging helpful messages

View File

@ -216,13 +216,6 @@ pub fn raise(sig: u8) RaiseError!void {
}
}
if (builtin.os == .wasi) {
switch (wasi.proc_raise(SIGABRT)) {
0 => return,
else => |err| return unexpectedErrno(err),
}
}
if (builtin.os == .linux) {
var set: linux.sigset_t = undefined;
// block application signals

View File

@ -67,7 +67,6 @@ pub extern "wasi_unstable" fn path_unlink_file(fd: fd_t, path: [*]const u8, path
pub extern "wasi_unstable" fn poll_oneoff(in: *const subscription_t, out: *event_t, nsubscriptions: usize, nevents: *usize) errno_t;
pub extern "wasi_unstable" fn proc_exit(rval: exitcode_t) noreturn;
pub extern "wasi_unstable" fn proc_raise(sig: signal_t) errno_t;
pub extern "wasi_unstable" fn random_get(buf: [*]u8, buf_len: usize) errno_t;