summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-11 23:01:06 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-11 23:01:06 +0000
commit43df859b957290a8fa1c1f55916aa560352099ee (patch)
treed2ce49b9ab5ca946bdb75dd766040027f3b4eab0 /linuxthreads
parent95fe9d959f956c8b31a3bd8801ea9dfe475842a5 (diff)
downloadglibc-43df859b957290a8fa1c1f55916aa560352099ee.tar.gz
glibc-43df859b957290a8fa1c1f55916aa560352099ee.tar.xz
glibc-43df859b957290a8fa1c1f55916aa560352099ee.zip
Update.
2001-04-11  David S. Miller  <davem@redhat.com>

	* sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
	up closer to user local variables so that new cleanup heuristics work.
	* sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/sysdeps/sparc/sparc32/pt-machine.h6
-rw-r--r--linuxthreads/sysdeps/sparc/sparc64/pt-machine.h8
-rw-r--r--linuxthreads/tst-cancel.c1
4 files changed, 14 insertions, 7 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 47c15c65cb..d21b6968c0 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-11  David S. Miller  <davem@redhat.com>
+
+	* sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
+	up closer to user local variables so that new cleanup heuristics work.
+	* sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
+
 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
 
 	* cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
diff --git a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
index 043cdeb116..5141e13636 100644
--- a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    sparc version.
-   Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -43,8 +43,8 @@ testandset (int *spinlock)
 
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
-#define CURRENT_STACK_FRAME  stack_pointer
-register char * stack_pointer __asm__("%sp");
+#define CURRENT_STACK_FRAME  (stack_pointer + (2 * 64))
+register char *stack_pointer __asm__("%sp");
 
 
 /* Registers %g6 and %g7 are reserved by the ABI for "system use".  It
diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
index 8fc5cc6a5e..a804807178 100644
--- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    Sparc v9 version.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -31,7 +31,7 @@ testandset (int *spinlock)
   int ret;
 
   __asm__ __volatile__("ldstub %1,%0"
-	: "=r"(ret), "=m"(*spinlock) : "m"(*spinlock));
+	: "=r" (ret), "=m" (*spinlock) : "m" (*spinlock));
 
   return ret;
 }
@@ -50,14 +50,14 @@ testandset (int *spinlock)
 
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
-#define CURRENT_STACK_FRAME  stack_pointer
+#define CURRENT_STACK_FRAME  (stack_pointer + (2 * 128))
 register char *stack_pointer __asm__ ("%sp");
 
 
 /* Registers %g6 and %g7 are reserved by the ABI for "system use".  It
    happens that Solaris uses %g6 for the thread pointer -- we do the same.  */
 struct _pthread_descr_struct;
-register struct _pthread_descr_struct *__thread_self __asm__("%g6");
+register struct _pthread_descr_struct *__thread_self __asm__ ("%g6");
 
 /* Return the thread descriptor for the current thread.  */
 #define THREAD_SELF  __thread_self
diff --git a/linuxthreads/tst-cancel.c b/linuxthreads/tst-cancel.c
index 75d6c0de66..f2f97d2dbf 100644
--- a/linuxthreads/tst-cancel.c
+++ b/linuxthreads/tst-cancel.c
@@ -20,6 +20,7 @@ cleanup (void *arg)
   char *cp = stpcpy (s, "cleanup ");
   *cp++ = '0' + nr;
   *cp++ = '\n';
+  __libc_lseek (fd, 0, SEEK_END);
   __libc_write (fd, s, cp - s);
 }