Skip to content

Commit

Permalink
linux: make ptid and ctid in clone() optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 authored and alexrp committed Dec 31, 2024
1 parent ec60156 commit 021289a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/std/os/linux.zig
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ pub fn clone(
stack: usize,
flags: u32,
arg: usize,
ptid: *i32,
ptid: ?*i32,
tp: usize, // aka tls
ctid: *i32,
ctid: ?*i32,
) usize {
// Can't directly call a naked function; cast to C calling convention first.
return @as(*const fn (
*const fn (arg: usize) callconv(.C) u8,
usize,
u32,
usize,
*i32,
?*i32,
usize,
*i32,
?*i32,
) callconv(.C) usize, @ptrCast(&syscall_bits.clone))(func, stack, flags, arg, ptid, tp, ctid);
}

Expand Down

0 comments on commit 021289a

Please sign in to comment.