authorgravatar for swoogan@gmail.comColin Svingen <swoogan@gmail.com> 2020-01-05 20:30:28-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-06 14:04:55-05:00
log4e6ad8efd9fcefb820acf4a03fc4ab9157f85c1b
tree802e47271075ab07cb0d5bc138c8d257bb4d3a63
parentc30106c90665079f525129e344cc1c13e4db162b

Removes proc_raise from WASI implementation


3 files changed, 2 insertions(+), 11 deletions(-)

lib/std/builtin.zig+2-3
......@@ -416,7 +416,7 @@ pub const CallOptions = struct {
416416/// therefore must be kept in sync with the compiler implementation.
417417pub const TestFn = struct {
418418 name: []const u8,
419 func: fn()anyerror!void,
419 func: fn () anyerror!void,
420420};
421421
422422/// 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
443443 },
444444 .wasi => {
445445 std.debug.warn("{}", .{msg});
446 _ = std.os.wasi.proc_raise(std.os.wasi.SIGABRT);
447 unreachable;
446 std.os.abort();
448447 },
449448 .uefi => {
450449 // TODO look into using the debug info and logging helpful messages
lib/std/os.zig-7
......@@ -216,13 +216,6 @@ pub fn raise(sig: u8) RaiseError!void {
216216 }
217217 }
218218
219 if (builtin.os == .wasi) {
220 switch (wasi.proc_raise(SIGABRT)) {
221 0 => return,
222 else => |err| return unexpectedErrno(err),
223 }
224 }
225
226219 if (builtin.os == .linux) {
227220 var set: linux.sigset_t = undefined;
228221 // block application signals
lib/std/os/wasi.zig-1
......@@ -67,7 +67,6 @@ pub extern "wasi_unstable" fn path_unlink_file(fd: fd_t, path: [*]const u8, path
6767pub extern "wasi_unstable" fn poll_oneoff(in: *const subscription_t, out: *event_t, nsubscriptions: usize, nevents: *usize) errno_t;
6868
6969pub extern "wasi_unstable" fn proc_exit(rval: exitcode_t) noreturn;
70pub extern "wasi_unstable" fn proc_raise(sig: signal_t) errno_t;
7170
7271pub extern "wasi_unstable" fn random_get(buf: [*]u8, buf_len: usize) errno_t;
7372