aboutsummaryrefslogtreecommitdiff
path: root/std/os.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-04-18 16:42:56 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-04-18 16:42:56 -0700
commitf4c7e1bf4971503e2d33af80537aef27ed2e4fe1 (patch)
tree1d99e8d2cd97d30870f95f46b2efcf872ccfcc49 /std/os.zig
parent5e33175517807c6e50fe66f8d6c65fc094c8e11a (diff)
downloadzig-f4c7e1bf4971503e2d33af80537aef27ed2e4fe1.tar.gz
zig-f4c7e1bf4971503e2d33af80537aef27ed2e4fe1.zip
rearrange standard library a bit
Diffstat (limited to 'std/os.zig')
-rw-r--r--std/os.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/std/os.zig b/std/os.zig
index 5e0ee4878a..8771e48bba 100644
--- a/std/os.zig
+++ b/std/os.zig
@@ -26,3 +26,11 @@ pub fn get_random_bytes(buf: []u8) -> %void {
else => unreachable{},
}
}
+
+#attribute("cold")
+pub fn abort() -> unreachable {
+ linux.raise(linux.SIGABRT);
+ linux.raise(linux.SIGKILL);
+ while (true) {}
+}
+