authorgravatar for misakikasumi@outlook.comMisaki Kasumi <misakikasumi@outlook.com> 2024-12-29 05:56:55+08:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-12-31 05:24:10+01:00
log021289a6531faaeee88e26a35412dbe54f6419e0
tree0a5292db79a467313e470d12ad02d45a9d079659
parentec60156f187a9baa02e0ac7e15ee7a864f098dcf

linux: make ptid and ctid in clone() optional


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/os/linux.zig+4-4
...@@ -71,9 +71,9 @@ pub fn clone(...@@ -71,9 +71,9 @@ pub fn clone(
71 stack: usize,71 stack: usize,
72 flags: u32,72 flags: u32,
73 arg: usize,73 arg: usize,
74 ptid: *i32,74 ptid: ?*i32,
75 tp: usize, // aka tls75 tp: usize, // aka tls
76 ctid: *i32,76 ctid: ?*i32,
77) usize {77) usize {
78 // Can't directly call a naked function; cast to C calling convention first.78 // Can't directly call a naked function; cast to C calling convention first.
79 return @as(*const fn (79 return @as(*const fn (
...@@ -81,9 +81,9 @@ pub fn clone(...@@ -81,9 +81,9 @@ pub fn clone(
81 usize,81 usize,
82 u32,82 u32,
83 usize,83 usize,
84 *i32,84 ?*i32,
85 usize,85 usize,
86 *i32,86 ?*i32,
87 ) callconv(.C) usize, @ptrCast(&syscall_bits.clone))(func, stack, flags, arg, ptid, tp, ctid);87 ) callconv(.C) usize, @ptrCast(&syscall_bits.clone))(func, stack, flags, arg, ptid, tp, ctid);
88}88}
8989