diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-10-01 15:57:38 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-10-01 13:58:58 -0400 |
| commit | 17f2af10b56dd508ebd4a22834fd594cb5a49864 (patch) | |
| tree | 38da45089fee93cf06ff7753eae768c922b5fdab /lib/std/os/linux/riscv64.zig | |
| parent | bed4bfa69ad57595e4595caa96653d9241a8dc2e (diff) | |
| download | zig-17f2af10b56dd508ebd4a22834fd594cb5a49864.tar.gz zig-17f2af10b56dd508ebd4a22834fd594cb5a49864.zip | |
Correct signal bits for MIPS
Also enable the segfault handler for all the supported architectures
beside MIPS.
Diffstat (limited to 'lib/std/os/linux/riscv64.zig')
| -rw-r--r-- | lib/std/os/linux/riscv64.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/std/os/linux/riscv64.zig b/lib/std/os/linux/riscv64.zig index 7bfe0295d3..64facede89 100644 --- a/lib/std/os/linux/riscv64.zig +++ b/lib/std/os/linux/riscv64.zig @@ -1,3 +1,5 @@ +usingnamespace @import("../bits.zig"); + pub fn syscall0(number: usize) usize { return asm volatile ("ecall" : [ret] "={x10}" (-> usize) @@ -84,3 +86,13 @@ pub fn syscall6( } pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; + +pub const restore = restore_rt; + +pub nakedcc fn restore_rt() void { + return asm volatile ("ecall" + : + : [number] "{x17}" (usize(SYS_rt_sigreturn)) + : "memory" + ); +} |
