# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
#if !defined NOT_IN_libc
# define __local_multiple_threads __libc_multiple_threads
-#else
+#elif defined IS_IN_libpthread
# define __local_multiple_threads __pthread_multiple_threads
+#else
+# define __local_multiple_threads __librt_multiple_threads
#endif
# ifndef __ASSEMBLER__
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
p_header.data.multiple_threads) == 0, 1)
# else
-extern int __local_multiple_threads attribute_hidden;
+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)
# endif
# else
# elif defined FLOATING_STACKS && USE___THREAD
# define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
# else
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
+# define __SINGLE_THREAD_CMP cmpl $0, __local_multiple_threads@GOTOFF(%ecx)
+# else
+# define __SINGLE_THREAD_CMP \
+ movl __local_multiple_threads@GOT(%ecx), %ecx;\
+ cmpl $0, (%ecx)
+# endif
# if !defined HAVE_HIDDEN || !USE___THREAD
# define SINGLE_THREAD_P \
SETUP_PIC_REG (cx); \
addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
- cmpl $0, __local_multiple_threads@GOTOFF(%ecx)
+ __SINGLE_THREAD_CMP
# else
# define SINGLE_THREAD_P \
call __i686.get_pc_thunk.cx; \
addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
- cmpl $0, __local_multiple_threads@GOTOFF(%ecx)
+ __SINGLE_THREAD_CMP
# endif
# endif
# endif
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# ifdef IS_IN_libpthread
# define CENABLE br.call.sptk.many b0 = __pthread_enable_asynccancel
# define CDISABLE br.call.sptk.many b0 = __pthread_disable_asynccancel
-# else
+# elif !defined NOT_IN_libc
# define CENABLE br.call.sptk.many b0 = __libc_enable_asynccancel
# define CDISABLE br.call.sptk.many b0 = __libc_disable_asynccancel
+# else
+# define CENABLE br.call.sptk.many b0 = __librt_enable_asynccancel
+# define CDISABLE br.call.sptk.many b0 = __librt_disable_asynccancel
# endif
#define COPY_ARGS_0 /* Nothing */
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# ifdef IS_IN_libpthread
# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel)
-# else
+# elif !defined NOT_IN_libc
# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel)
+# else
+# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel)
+# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel)
# endif
# ifndef __ASSEMBLER__
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel)
# define __local_multiple_threads __pthread_multiple_threads
-# else
+# elif !defined NOT_IN_libc
# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel)
# define __local_multiple_threads __libc_multiple_threads
+# else
+# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel); nop
+# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel); nop
+# define __local_multiple_threads __librt_multiple_threads
# endif
# ifndef __ASSEMBLER__
-extern int __local_multiple_threads attribute_hidden;
+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 \
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# ifdef IS_IN_libpthread
# define CENABLE __pthread_enable_asynccancel
# define CDISABLE __pthread_disable_asynccancel
-# else
+# elif !defined NOT_IN_libc
# define CENABLE __libc_enable_asynccancel
# define CDISABLE __libc_disable_asynccancel
+# else
+# define CENABLE __librt_enable_asynccancel
+# define CDISABLE __librt_disable_asynccancel
# endif
#define STM_0 /* Nothing */
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# define CENABLE __pthread_enable_asynccancel
# define CDISABLE __pthread_disable_asynccancel
# define __local_multiple_threads __pthread_multiple_threads
-# else
+# elif !defined NOT_IN_libc
# define CENABLE __libc_enable_asynccancel
# define CDISABLE __libc_disable_asynccancel
# define __local_multiple_threads __libc_multiple_threads
+# else
+# define CENABLE __librt_enable_asynccancel
+# define CDISABLE __librt_disable_asynccancel
# endif
#define STM_0 /* Nothing */
#define LM_4 lmg %r2,%r5,16+160(%r15);
#define LM_5 lmg %r2,%r5,16+160(%r15);
-# ifndef __ASSEMBLER__
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
+# ifndef __ASSEMBLER__
extern int __local_multiple_threads attribute_hidden;
-# define SINGLE_THREAD_P \
+# define SINGLE_THREAD_P \
__builtin_expect (__local_multiple_threads == 0, 1)
-# else
-# define SINGLE_THREAD_P \
+# else
+# define SINGLE_THREAD_P \
larl %r1,__local_multiple_threads; \
icm %r0,15,0(%r1);
+# endif
+
+# else
+
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ p_header.data.multiple_threads) == 0, 1)
+# else
+# define SINGLE_THREAD_P \
+ ear %r1,%a0; \
+ sllg %r1,%r1,32; \
+ ear %r1,%a1; \
+ icm %r1,15,MULTIPLE_THREADS_OFFSET(%r1);
+# endif
+
# endif
#elif !defined __ASSEMBLER__
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# ifdef IS_IN_libpthread
# define CENABLE call __pthread_enable_asynccancel
# define CDISABLE call __pthread_disable_asynccancel
-# else
+# elif defined !NOT_IN_libc
# define CENABLE call __libc_enable_asynccancel
# define CDISABLE call __libc_disable_asynccancel
+# else
+# define CENABLE call __librt_enable_asynccancel
+# define CDISABLE call __librt_disable_asynccancel
# endif
#define COPY_ARGS_0 /* Nothing */
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# ifdef IS_IN_libpthread
# define CENABLE call __pthread_enable_asynccancel
# define CDISABLE call __pthread_disable_asynccancel
-# else
+# elif !defined NOT_IN_libc
# define CENABLE call __libc_enable_asynccancel
# define CDISABLE call __libc_disable_asynccancel
+# else
+# define CENABLE call __librt_enable_asynccancel
+# define CDISABLE call __librt_disable_asynccancel
# endif
#define COPY_ARGS_0 /* Nothing */
# include <linuxthreads/internals.h>
#endif
-#if !defined NOT_IN_libc || defined IS_IN_libpthread
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
# define CENABLE call __pthread_enable_asynccancel;
# define CDISABLE call __pthread_disable_asynccancel;
# define __local_multiple_threads __pthread_multiple_threads
-# else
+# elif !defined NOT_IN_libc
# define CENABLE call __libc_enable_asynccancel;
# define CDISABLE call __libc_disable_asynccancel;
# define __local_multiple_threads __libc_multiple_threads
+# else
+# define CENABLE call __librt_enable_asynccancel@plt;
+# define CDISABLE call __librt_disable_asynccancel@plt;
# endif
-# ifndef __ASSEMBLER__
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
extern int __local_multiple_threads attribute_hidden;
# define SINGLE_THREAD_P \
__builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads(%rip)
+# endif
+
# else
-# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads(%rip)
+
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ p_header.data.multiple_threads) == 0, 1)
+# else
+# define SINGLE_THREAD_P cmpl $0, %fs:MULTIPLE_THREADS_OFFSET
+# endif
+
# endif
#elif !defined __ASSEMBLER__