aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-16 16:49:39 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-16 16:49:39 +0000
commite853ea00f30f9f8e9bbcc4e58505f2b0a0479590 (patch)
treed66a3ebbde25168e18a8941882f9006f01b1478e /sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
parent04736140bad133c10b6819008d660cb5a95b8fb1 (diff)
downloadglibc-e853ea00f30f9f8e9bbcc4e58505f2b0a0479590.zip
glibc-e853ea00f30f9f8e9bbcc4e58505f2b0a0479590.tar.gz
glibc-e853ea00f30f9f8e9bbcc4e58505f2b0a0479590.tar.bz2
Update.
2004-12-16 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Add support for NPTL where the PID is stored at userlevel and needs to be reset when CLONE_THREAD is not used. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (SYSCALL_ERROR_HANDLER): If RTLD_PRIVATE_ERRNO, use rtld_errno instead of errno. * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Include sysdep-cancel.h instead of sysdep.h. Handle cancellation. * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Regenerate. * sysdeps/ieee754/ldbl-128/e_expl.c: Include stdlib.h.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/clone.S20
1 files changed, 19 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
index 5bebe35..66cdbf3 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu).
@@ -22,6 +23,10 @@
#include <asm/errno.h>
#include <asm/unistd.h>
+#include <tcb-offsets.h>
+
+#define CLONE_VM 0x00000100
+#define CLONE_THREAD 0x00010000
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
pid_t *ptid, void *tls, pid_t *ctid); */
@@ -69,6 +74,19 @@ __clone:
.type __thread_start,@function
__thread_start:
+#ifdef RESET_PID
+ sethi %hi(CLONE_THREAD), %l0
+ andcc %i2, %l0, %g0
+ bne 1f
+ andcc %i2, CLONE_VM, %g0
+ bne,a 2f
+ mov -1,%o0
+ set __NR_getpid,%g1
+ ta 0x10
+2: st %o0,[%g7 + PID]
+ st %o0,[%g7 + TID]
+1:
+#endif
call %i0
mov %i3,%o0
call _exit,0