aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-14 04:11:30 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-14 04:11:30 +0000
commit82e2ba9a036d0a8a01344271ebd2db69f3b20cc7 (patch)
tree42f4c0aedfcbf1e2d38d12a311bf8a68ebab90d0 /linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
parent10677727e24ccda9f364aa1f043a97a9204947a9 (diff)
downloadglibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.tar
glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.tar.gz
glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.tar.bz2
glibc-82e2ba9a036d0a8a01344271ebd2db69f3b20cc7.zip
Update.
2004-01-13 Ulrich Drepper <drepper@redhat.com> * posix/regex.c: Support crappy compilers and platforms which have problems with alloca. * posix/regex_internal.h: Likewise. Patch by Paolo Bonzini.
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h')
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
index e789d47b9d..0c74676766 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
+++ b/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
@@ -89,13 +89,34 @@
# define __local_multiple_threads __librt_multiple_threads
# endif
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
+# ifdef HAVE_TLS_SUPPORT
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
-# else
-# define SINGLE_THREAD_P \
+# else
+# define SINGLE_THREAD_P \
lwz 10,MULTIPLE_THREADS_OFFSET(13); \
cmpwi 10,0
+# endif
+# else /* !HAVE_TLS_SUPPORT */
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
+ attribute_hidden;
+# else
+ ;
+# endif
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P \
+ .section ".toc","aw"; \
+.LC__local_multiple_threads:; \
+ .tc __local_multiple_threads[TC],__local_multiple_threads; \
+ .previous; \
+ ld 10,.LC__local_multiple_threads@toc(2); \
+ lwz 10,0(10); \
+ cmpwi 10,0
+# endif
# endif
#elif !defined __ASSEMBLER__