This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] IA64 extra clone2 flags
- From: Ian Wienand <ianw at gelato dot unsw dot edu dot au>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 3 Mar 2003 11:56:11 +1100
- Subject: [PATCH] IA64 extra clone2 flags
This changes clone2 on IA64 to support all the new flags introduced a
while ago.
-i
ianw at gelato dot unsw dot edu dot au
http://www.gelato.unsw.edu.au
2003-03-03 Ian Wienand <ianw at gelato dot unsw dot edu dot au>
* sysdeps/unix/sysv/linux/ia64/clone2.S: update to take extra clone flags
* include/sched.h: update clone2 prototype
--- sysdeps/unix/sysv/linux/ia64/clone2.S 2001-07-06 14:56:17.000000000 +1000
+++ /home/ianw/libc/sysdeps/unix/sysv/linux/ia64/clone2.S 2003-03-03 11:31:27.000000000 +1100
@@ -21,11 +21,12 @@
#include <asm/errno.h>
-/* int __clone2(int (*fn) (void *arg), void *child_stack_base,
-/* size_t child_stack_size, int flags, void *arg) */
+/* int __clone2(int (*fn) (void *arg), void *child_stack_base,
+ size_t child_stack_size, int flags, void *arg,
+ pid_t *child_tid, pid_t *parent_tid,
+ struct user_desc *tls) */
ENTRY(__clone2)
- alloc r2=ar.pfs,5,2,3,0
+ alloc r2=ar.pfs,8,2,6,0
cmp.eq p6,p0=0,in0
mov r8=EINVAL
(p6) br.cond.spnt.few __syscall_error
@@ -41,6 +42,9 @@
mov out0=in3 /* Flags are first syscall argument. */
mov out1=in1 /* Stack address. */
mov out2=in2 /* Stack size. */
+ mov out3=in5 /* Child TID Pointer */
+ mov out4=in6 /* Parent TID Pointer */
+ mov out5=in7 /* TLS pointer */
DO_CALL (SYS_ify (clone2))
cmp.eq p6,p0=-1,r10
;;
--- include/sched.h 2002-08-15 22:52:24.000000000 +1000
+++ /home/ianw/libc/include/sched.h 2003-02-20 14:55:26.000000000 +1100
@@ -17,6 +17,11 @@
/* These are Linux specific. */
extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg, ...);
-extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
- size_t __child_stack_size, int __flags, void *__arg);
+
+struct user_desc;
+extern int __clone2(int (*__fn) (void *__arg), void *__child_stack_base,
+size_t __child_stack_size, int __flags, void *__arg, __pid_t *__child_tid,
+__pid_t *__parent_tid, struct user_desc *__tls);
+
+
#endif