diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-12-17 10:09:19 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-12-17 10:09:19 +0000 |
commit | 337cd636a17559b7fba33c480759a4e6187e0647 (patch) | |
tree | 6195524bb75b92e28500e9c4153265a409ede509 /sysdeps/unix/sysv/linux/sparc/sparc32 | |
parent | 6ec2d7443853bce3f0957712540be6b296c1a672 (diff) |
Updated to fedora-glibc-20041217T0906cvs/fedora-glibc-2_3_3-97
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 20 |
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 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 <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 |