clone.2: Add information about clone and clone2 on IA-64

Note that clone() definition on IA-64 is the same as on
SH/Tile/Alpha, align __clone2 declarations in line with the
previous ones, add clone2 syscall prototype.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Eugene Syromyatnikov 2018-09-19 19:12:04 +02:00 committed by Michael Kerrisk
parent a970e1f920
commit 8016cc9034
1 changed files with 18 additions and 13 deletions

View File

@ -867,7 +867,7 @@ and there are variations in the arguments across architectures,
as detailed in the following paragraphs. as detailed in the following paragraphs.
.PP .PP
The raw system call interface on x86-64 and some other architectures The raw system call interface on x86-64 and some other architectures
(including sh, tile, and alpha) is: (including sh, tile, ia-64, and alpha) is:
.PP .PP
.in +4 .in +4
.EX .EX
@ -926,24 +926,29 @@ For details, see the kernel (and glibc) source.
.SS ia64 .SS ia64
On ia64, a different interface is used: On ia64, a different interface is used:
.PP .PP
.nf .in +4
.EX
.BI "int __clone2(int (*" "fn" ")(void *), " .BI "int __clone2(int (*" "fn" ")(void *), "
.BI " void *" child_stack_base ", size_t " stack_size , .BI " void *" child_stack_base ", size_t " stack_size ,
.BI " int " flags ", void *" "arg" ", ... " .BI " int " flags ", void *" "arg" ", ... "
.BI " /* pid_t *" ptid ", struct user_desc *" tls \ .BI " /* pid_t *" ptid ", struct user_desc *" tls \
", pid_t *" ctid " */ );" ", pid_t *" ctid " */ );"
.fi .EE
.in
.PP .PP
The prototype shown above is for the glibc wrapper function; The prototype shown above is for the glibc wrapper function; for the syscall
the raw system call interface has no itself, prototype can be described as follows (it is identical to the
.I fn .BR clone ()
or prototype on microblaze):
.I arg .PP
argument, and changes the order of the arguments so that .in +4
.I flags .EX
is the first argument, and .BI "long clone2(unsigned long " flags ", void *" child_stack_base ,
.I tls .BI " int " stack_size , "\fR /* Size of stack */"
is the last argument. .BI " int *" ptid ", int *" ctid ,
.BI " unsigned long " tls );
.EE
.in
.PP .PP
.BR __clone2 () .BR __clone2 ()
operates in the same way as operates in the same way as