From e853ea00f30f9f8e9bbcc4e58505f2b0a0479590 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 16 Dec 2004 16:49:39 +0000 Subject: Update. 2004-12-16 Jakub Jelinek * 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. --- sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32') diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S index 5bebe35628..66cdbf3ca7 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 #include +#include + +#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 -- cgit v1.2.3