aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorColin Svingen <swoogan@gmail.com>2020-01-05 20:30:28 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-06 14:04:55 -0500
commit4e6ad8efd9fcefb820acf4a03fc4ab9157f85c1b (patch)
tree802e47271075ab07cb0d5bc138c8d257bb4d3a63 /lib/std
parentc30106c90665079f525129e344cc1c13e4db162b (diff)
downloadzig-4e6ad8efd9fcefb820acf4a03fc4ab9157f85c1b.tar.gz
zig-4e6ad8efd9fcefb820acf4a03fc4ab9157f85c1b.zip
Removes proc_raise from WASI implementation
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/builtin.zig5
-rw-r--r--lib/std/os.zig7
-rw-r--r--lib/std/os/wasi.zig1
3 files changed, 2 insertions, 11 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 687e169bbe..36767494e5 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -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
diff --git a/lib/std/os.zig b/lib/std/os.zig
index 17945b9ce4..676d249e87 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -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
diff --git a/lib/std/os/wasi.zig b/lib/std/os/wasi.zig
index 6c981dfc72..48b591ecc4 100644
--- a/lib/std/os/wasi.zig
+++ b/lib/std/os/wasi.zig
@@ -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;