aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux/mips.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-06-27 18:27:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-06-27 18:27:06 -0700
commit0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987 (patch)
treec5c11adbecdba4ecd60fa45d612a57d3f9a9d8c6 /lib/std/os/linux/mips.zig
parentdf1f401cf0e997ed289e14f69ab1114e839b56ee (diff)
downloadzig-0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987.tar.gz
zig-0b8bd9b2b4f609fb4ae7d31da7e7a0fd4f5ad987.zip
std.os.linux.clone: upgrade to stage2 fn ptr semantics
Diffstat (limited to 'lib/std/os/linux/mips.zig')
-rw-r--r--lib/std/os/linux/mips.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig
index 4341949b2f..ee0aff281c 100644
--- a/lib/std/os/linux/mips.zig
+++ b/lib/std/os/linux/mips.zig
@@ -190,8 +190,13 @@ pub fn syscall7(
);
}
+const CloneFn = switch (@import("builtin").zig_backend) {
+ .stage1 => fn (arg: usize) callconv(.C) u8,
+ else => *const fn (arg: usize) callconv(.C) u8,
+};
+
/// This matches the libc clone function.
-pub extern fn clone(func: fn (arg: usize) callconv(.C) u8, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize;
+pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize;
pub fn restore() callconv(.Naked) void {
return asm volatile ("syscall"