From 484cc8018b9e27a8fd90f15eaeee132a430131d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 7 Dec 2004 20:34:18 +0000 Subject: Update. 2004-12-07 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for NPTL where the PID is stored at userlevel and needs to be reset when CLONE_THREAD is not used. Restore gp before calling _exit. --- nptl/tst-getpid1.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'nptl/tst-getpid1.c') diff --git a/nptl/tst-getpid1.c b/nptl/tst-getpid1.c index 9d63715..061b48d 100644 --- a/nptl/tst-getpid1.c +++ b/nptl/tst-getpid1.c @@ -5,6 +5,10 @@ #include #include +#ifndef TEST_CLONE_FLAGS +#define TEST_CLONE_FLAGS 0 +#endif + static int sig; static int @@ -35,8 +39,16 @@ do_test (void) return 1; } +#ifdef __ia64__ + extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, + size_t __child_stack_size, int __flags, + void *__arg, ...); + char st[256 * 1024]; + pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0); +#else char st[128 * 1024]; - pid_t p = clone (f, st + sizeof (st), 0, 0); + pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0); +#endif if (p == -1) { printf("clone failed: %m\n"); -- cgit v1.1