diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-27 18:27:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-27 18:27:06 -0700 |
| commit | 0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987 (patch) | |
| tree | c5c11adbecdba4ecd60fa45d612a57d3f9a9d8c6 /lib/std/os/linux/riscv64.zig | |
| parent | df1f401cf0e997ed289e14f69ab1114e839b56ee (diff) | |
| download | zig-0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987.tar.gz zig-0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987.zip | |
std.os.linux.clone: upgrade to stage2 fn ptr semantics
Diffstat (limited to 'lib/std/os/linux/riscv64.zig')
| -rw-r--r-- | lib/std/os/linux/riscv64.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/os/linux/riscv64.zig b/lib/std/os/linux/riscv64.zig index 079d501c32..dbf22e0aa4 100644 --- a/lib/std/os/linux/riscv64.zig +++ b/lib/std/os/linux/riscv64.zig @@ -95,7 +95,12 @@ pub fn syscall6( ); } -pub extern fn clone(func: fn (arg: usize) callconv(.C) u8, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; +const CloneFn = switch (@import("builtin").zig_backend) { + .stage1 => fn (arg: usize) callconv(.C) u8, + else => *const fn (arg: usize) callconv(.C) u8, +}; + +pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; pub const restore = restore_rt; |
