aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-01-13 09:36:22 +0000
committerRichard Henderson <rth@redhat.com>2004-01-13 09:36:22 +0000
commitdc927809b187986876a69419df68c83623b79ab3 (patch)
treef75494c0271c80684cb560e5b08019f9b5e23090 /nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
parent141749ca169d3a5f3a328d3cb91473e3af4256b1 (diff)
downloadglibc-dc927809b187986876a69419df68c83623b79ab3.tar
glibc-dc927809b187986876a69419df68c83623b79ab3.tar.gz
glibc-dc927809b187986876a69419df68c83623b79ab3.tar.bz2
glibc-dc927809b187986876a69419df68c83623b79ab3.zip
* sysdeps/alpha/Makefile: New file. * sysdeps/alpha/tcb-offsets.sym: New file. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based on powerpc version. 2004-01-13 Richard Henderson <rth@redhat.com> * sysdeps/alpha/Makefile: New file. * sysdeps/alpha/tcb-offsets.sym: New file. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version. * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based on powerpc version.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h b/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
index 1b27e27db0..3b08b22c1a 100644
--- a/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
+++ b/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
@@ -132,26 +132,28 @@ __LABEL($syscall_error) \
# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
# endif
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
-# ifndef __ASSEMBLER__
+#endif
+
+#if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
extern int __local_multiple_threads attribute_hidden;
-# define SINGLE_THREAD_P \
+# define SINGLE_THREAD_P \
__builtin_expect (__local_multiple_threads == 0, 1)
-# elif defined(PIC)
-# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
-# else
-# define SINGLE_THREAD_P(reg) \
+# elif defined(PIC)
+# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
+# else
+# define SINGLE_THREAD_P(reg) \
ldah reg, __local_multiple_threads(gp) !gprelhigh; \
ldl reg, __local_multiple_threads(reg) !gprellow
-# endif
-# else
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
+# endif
+#else
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
header.multiple_threads) == 0, 1)
-# else
-# error Not done
-# endif
+# else
+# define SINGLE_THREAD_P(reg) \
+ call_pal PAL_rduniq; \
+ ldl reg, MULTIPLE_THREADS_OFFSET($0)
# endif
-
#endif