aboutsummaryrefslogtreecommitdiff
path: root/std/os.zig
diff options
context:
space:
mode:
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) {}
+}
+