the order of the fourth and fifth arguments is reversed.
On the cris and s390 architectures,
the order of the first and second arguments is reversed.
+.SS clone2()
+On ia64, a different interface is used:
+.nf
+
+.BI "int __clone2(int (*" "fn" ")(void *), "
+.BI " void *" child_stack_base ", size_t " stack_size ,
+.BI " int " flags ", void *" "arg" ", ... "
+.BI " /* pid_t *" ptid ", struct user_desc *" tls \
+", pid_t *" ctid " */ );"
+.fi
+.PP
+The prototype shown above is for the glibc wrapper function;
+the raw system call interface has no
+.I fn
+or
+.I arg
+argument, and changes the order of the arguments so that
+.I flags
+is the first argument, and
+.I tls
+is the last argument.
+.PP
+.BR __clone2 ()
+operates in the same way as
+.BR clone (),
+except that
+.I child_stack_base
+points to the lowest address of the child's stack area,
+and
+.I stack_size
+specifies the size of the stack pointed to by
+.IR child_stack_base .
.SS Linux 2.4 and earlier
In Linux 2.4 and earlier,
.BR clone ()
.BR clone ()
should not be called through vsyscall, but directly through
.IR "int $0x80" .
-
-On ia64, a different interface is used:
-.nf
-
-.BI "int __clone2(int (*" "fn" ")(void *), "
-.BI " void *" child_stack_base ", size_t " stack_size ,
-.BI " int " flags ", void *" "arg" ", ... "
-.BI " /* pid_t *" ptid ", struct user_desc *" tls \
-", pid_t *" ctid " */ );"
-.fi
-.PP
-The prototype shown above is for the glibc wrapper function;
-the raw system call interface has no
-.I fn
-or
-.I arg
-argument, and changes the order of the arguments so that
-.I flags
-is the first argument, and
-.I tls
-is the last argument.
-.PP
-.BR __clone2 ()
-operates in the same way as
-.BR clone (),
-except that
-.I child_stack_base
-points to the lowest address of the child's stack area,
-and
-.I stack_size
-specifies the size of the stack pointed to by
-.IR child_stack_base .
.SH BUGS
Versions of the GNU C library that include the NPTL threading library
contain a wrapper function for