Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/lib/libpthread/arch Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/4b9e3d0608b5
branches: netbsd-3
changeset: 577697:4b9e3d0608b5
user: riz <riz%NetBSD.org@localhost>
date: Sun Jan 08 15:58:26 2006 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #1093):
lib/libpthread/arch/sparc/pthread_switch.S: revision 1.8
lib/libpthread/arch/x86_64/pthread_switch.S: revision 1.11
lib/libpthread/arch/sparc64/pthread_switch.S: revision 1.9
lib/libpthread/arch/i386/pthread_switch.S: revision 1.9
A couple of fixes to make libpthread really shared, i.e. not have text re-
locations:
- Don't declare pthread__switch_away global
- Do the PIC dance for pthread__switch_return_point and
pthread__locked_switch. Ideally these (and other) symbols would
be hidden.
Thanks to uwe@, dyoung@ and elad@ for help.
XXX sh3 is still to be done.
XXX vax does strange things.
diffstat:
lib/libpthread/arch/i386/pthread_switch.S | 3 +--
lib/libpthread/arch/sparc/pthread_switch.S | 4 ++--
lib/libpthread/arch/sparc64/pthread_switch.S | 4 ++--
lib/libpthread/arch/x86_64/pthread_switch.S | 11 +++++++++--
4 files changed, 14 insertions(+), 8 deletions(-)
diffs (94 lines):
diff -r 4d43017c1065 -r 4b9e3d0608b5 lib/libpthread/arch/i386/pthread_switch.S
--- a/lib/libpthread/arch/i386/pthread_switch.S Sun Jan 08 15:48:45 2006 +0000
+++ b/lib/libpthread/arch/i386/pthread_switch.S Sun Jan 08 15:58:26 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_switch.S,v 1.8 2004/04/23 02:58:27 simonb Exp $ */
+/* $NetBSD: pthread_switch.S,v 1.8.2.1 2006/01/08 15:58:26 riz Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -168,7 +168,6 @@
* Helper switch code used by pthread__locked_switch() and
* pthread__upcall_switch() when they discover spinlock preemption.
*/
-.globl pthread__switch_away
pthread__switch_away:
STACK_SWITCH
diff -r 4d43017c1065 -r 4b9e3d0608b5 lib/libpthread/arch/sparc/pthread_switch.S
--- a/lib/libpthread/arch/sparc/pthread_switch.S Sun Jan 08 15:48:45 2006 +0000
+++ b/lib/libpthread/arch/sparc/pthread_switch.S Sun Jan 08 15:58:26 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_switch.S,v 1.7 2003/09/07 14:47:54 cl Exp $ */
+/* $NetBSD: pthread_switch.S,v 1.7.6.1 2006/01/08 15:58:26 riz Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@
* %i2 flag to clear lock
*/
-ENTRY(pthread__switch_away)
+pthread__switch_away:
STACK_SWITCH(%i1, %l2)
diff -r 4d43017c1065 -r 4b9e3d0608b5 lib/libpthread/arch/sparc64/pthread_switch.S
--- a/lib/libpthread/arch/sparc64/pthread_switch.S Sun Jan 08 15:48:45 2006 +0000
+++ b/lib/libpthread/arch/sparc64/pthread_switch.S Sun Jan 08 15:58:26 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_switch.S,v 1.8 2003/09/07 14:47:55 cl Exp $ */
+/* $NetBSD: pthread_switch.S,v 1.8.6.1 2006/01/08 15:58:26 riz Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
* %i2 flag to clear lock
*/
-ENTRY(pthread__switch_away)
+pthread__switch_away:
STACK_SWITCH(%i1,%l2)
diff -r 4d43017c1065 -r 4b9e3d0608b5 lib/libpthread/arch/x86_64/pthread_switch.S
--- a/lib/libpthread/arch/x86_64/pthread_switch.S Sun Jan 08 15:48:45 2006 +0000
+++ b/lib/libpthread/arch/x86_64/pthread_switch.S Sun Jan 08 15:58:26 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_switch.S,v 1.10 2004/04/23 02:58:27 simonb Exp $ */
+/* $NetBSD: pthread_switch.S,v 1.10.2.1 2006/01/08 15:58:26 riz Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -136,7 +136,11 @@
* Edit the context so that it continues as if returning from
* the _setcontext_u below.
*/
+#ifdef PIC
+ movq PIC_GOT(pthread__switch_return_point), %r15
+#else
leaq pthread__switch_return_point(%rip), %r15
+#endif
movq %r15, UC_RIP(%r14)
movq %r14, PT_UC(%r12)
@@ -157,7 +161,6 @@
* Helper switch code used by pthread__locked_switch() and
* pthread__upcall_switch() when they discover spinlock preemption.
*/
-.globl pthread__switch_away
pthread__switch_away:
STACK_SWITCH
@@ -204,7 +207,11 @@
* Edit the context so that it continues as if returning from
* the _setcontext_u below.
*/
+#ifdef PIC
+ movq PIC_GOT(locked_return_point), %r15
+#else
leaq locked_return_point(%rip), %r15
+#endif
movq %r15, UC_RIP(%r14)
movq %r14, PT_UC(%r12)
Home |
Main Index |
Thread Index |
Old Index