diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/single-thread.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/single-thread.h | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/sysdeps/unix/sysv/linux/single-thread.h b/sysdeps/unix/sysv/linux/single-thread.h index 841f8c69d5..2fac8dcc11 100644 --- a/sysdeps/unix/sysv/linux/single-thread.h +++ b/sysdeps/unix/sysv/linux/single-thread.h @@ -32,35 +32,13 @@ extern int __libc_multiple_threads; libc_hidden_proto (__libc_multiple_threads) #endif -#ifdef SINGLE_THREAD_BY_GLOBAL -# if IS_IN (libc) -# define SINGLE_THREAD_P \ - __glibc_likely (__libc_multiple_threads == 0) -# elif IS_IN (libpthread) -extern int __pthread_multiple_threads; -# define SINGLE_THREAD_P \ - __glibc_likely (__pthread_multiple_threads == 0) -# elif IS_IN (librt) -# define SINGLE_THREAD_P \ - __glibc_likely (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0) -# else -/* For rtld, et cetera. */ -# define SINGLE_THREAD_P (1) -# endif -#else /* SINGLE_THREAD_BY_GLOBAL */ -# if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) -# define SINGLE_THREAD_P \ - __glibc_likely (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0) -# else -/* For rtld, et cetera. */ -# define SINGLE_THREAD_P (1) -# endif -#endif /* SINGLE_THREAD_BY_GLOBAL */ +#if !defined SINGLE_THREAD_BY_GLOBAL || IS_IN (rtld) +# define SINGLE_THREAD_P \ + (THREAD_GETMEM (THREAD_SELF, header.multiple_threads) == 0) +#else +# define SINGLE_THREAD_P (__libc_multiple_threads == 0) +#endif -#define RTLD_SINGLE_THREAD_P \ - __glibc_likely (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0) +#define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P #endif /* _SINGLE_THREAD_H */ |