linux: make ptid and ctid in clone() optional

This commit is contained in:
Misaki Kasumi 2024-12-29 05:56:55 +08:00 committed by Alex Rønne Petersen
parent ec60156f18
commit 021289a653

View File

@ -71,9 +71,9 @@ 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 (
@ -81,9 +81,9 @@ pub fn clone(
usize,
u32,
usize,
*i32,
?*i32,
usize,
*i32,
?*i32,
) callconv(.C) usize, @ptrCast(&syscall_bits.clone))(func, stack, flags, arg, ptid, tp, ctid);
}