diff options
| author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-20 14:22:40 +0530 |
|---|---|---|
| committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-11-24 11:41:46 +0530 |
| commit | ce9f10f7f0cc83df3e307a18e480587c3b404321 (patch) | |
| tree | 5928110640fc4f478949efc01ad50b97de4266e0 | |
| parent | 016afc75cd45dfaf49c0aa7a9befda77ab933846 (diff) | |
| download | glibc-ce9f10f7f0cc83df3e307a18e480587c3b404321.tar.xz glibc-ce9f10f7f0cc83df3e307a18e480587c3b404321.zip | |
Remove IS_IN_libpthread
Replace with IS_IN (libpthread). Generated code unchanged on
x86_64.
* nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread.
* nptl/pthreadP.h: Likewise.
* nptl_db/structs.def: Likewise.
* sysdeps/arm/sysdep.h: Likewise.
* sysdeps/nptl/bits/libc-lock.h: Likewise.
* sysdeps/nptl/bits/libc-lockP.h: Likewise.
* sysdeps/sparc/sparc32/lowlevellock.c: Likewise.
* sysdeps/unix/alpha/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
35 files changed, 113 insertions, 78 deletions
@@ -1,5 +1,40 @@ 2014-11-24 Siddhesh Poyarekar <siddhesh@redhat.com> + * nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread. + * nptl/pthreadP.h: Likewise. + * nptl_db/structs.def: Likewise. + * sysdeps/arm/sysdep.h: Likewise. + * sysdeps/nptl/bits/libc-lock.h: Likewise. + * sysdeps/nptl/bits/libc-lockP.h: Likewise. + * sysdeps/sparc/sparc32/lowlevellock.c: Likewise. + * sysdeps/unix/alpha/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. + * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. + * include/mqueue.h: Use IS_IN instead of IS_IN_librt. * nptl/pthreadP.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. diff --git a/nptl/lowlevellock.c b/nptl/lowlevellock.c index e198af7e8d..4c093fcb01 100644 --- a/nptl/lowlevellock.c +++ b/nptl/lowlevellock.c @@ -35,7 +35,7 @@ __lll_lock_wait_private (int *futex) /* These functions don't get included in libc.so */ -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) void __lll_lock_wait (int *futex, int private) { diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 376dbff316..318505635f 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -244,7 +244,7 @@ extern int __pthread_debug attribute_hidden; extern void __pthread_unwind (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute __attribute ((__noreturn__)) -#if !defined SHARED && !defined IS_IN_libpthread +#if !defined SHARED && !IS_IN (libpthread) weak_function #endif ; @@ -258,7 +258,7 @@ extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) hidden_proto (__pthread_unwind) hidden_proto (__pthread_unwind_next) hidden_proto (__pthread_register_cancel) @@ -302,7 +302,7 @@ __do_cancel (void) # define LIBC_CANCEL_HANDLED() \ __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \ __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel") -#elif defined IS_IN_libpthread +#elif IS_IN (libpthread) # define LIBC_CANCEL_ASYNC() CANCEL_ASYNC () # define LIBC_CANCEL_RESET(val) CANCEL_RESET (val) # define LIBC_CANCEL_HANDLED() \ @@ -347,7 +347,7 @@ extern int __make_stacks_executable (void **stack_endp) /* longjmp handling. */ extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe); -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) hidden_proto (__pthread_cleanup_upto) #endif @@ -492,7 +492,7 @@ extern int __pthread_enable_asynccancel (void) attribute_hidden; extern void __pthread_disable_asynccancel (int oldtype) internal_function attribute_hidden; -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) hidden_proto (__pthread_mutex_init) hidden_proto (__pthread_mutex_destroy) hidden_proto (__pthread_mutex_lock) @@ -531,7 +531,7 @@ extern int __librt_enable_asynccancel (void) attribute_hidden; extern void __librt_disable_asynccancel (int oldtype) internal_function attribute_hidden; -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) /* Special versions which use non-exported functions. */ extern void __pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer, void (*routine) (void *), void *arg) diff --git a/nptl_db/structs.def b/nptl_db/structs.def index ec72ef102a..5b905e20cc 100644 --- a/nptl_db/structs.def +++ b/nptl_db/structs.def @@ -74,7 +74,7 @@ DB_STRUCT_FIELD (link_map, l_tls_modid) DB_STRUCT_ARRAY_FIELD (dtv, dtv) #define pointer_val pointer.val /* Field of anonymous struct in dtv_t. */ DB_STRUCT_FIELD (dtv_t, pointer_val) -#if !defined IS_IN_libpthread || TLS_TCB_AT_TP +#if !IS_IN (libpthread) || TLS_TCB_AT_TP DB_STRUCT_FIELD (pthread, dtvp) #endif diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 9225293e32..9299be21f7 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -344,7 +344,7 @@ /* Pointer mangling support. */ #if (defined IS_IN_rtld || \ - (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread))) + (!defined SHARED && (!defined NOT_IN_libc || IS_IN (libpthread)))) # ifdef __ASSEMBLER__ # define PTR_MANGLE_LOAD(guard, tmp) \ LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0) diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/bits/libc-lock.h index 66e5b93443..2acc6bfcd0 100644 --- a/sysdeps/nptl/bits/libc-lock.h +++ b/sysdeps/nptl/bits/libc-lock.h @@ -26,7 +26,7 @@ /* Mutex type. */ #if defined _LIBC || defined _IO_MTSAFE_IO -# if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC +# if (defined NOT_IN_libc && !IS_IN (libpthread)) || !defined _LIBC typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; # else typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t; @@ -47,7 +47,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; /* Define an initialized recursive lock variable NAME with storage class CLASS. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) # define __libc_lock_define_initialized_recursive(CLASS, NAME) \ CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; # define _LIBC_LOCK_RECURSIVE_INITIALIZER \ @@ -60,7 +60,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; #endif /* Initialize a recursive mutex. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) # define __libc_lock_init_recursive(NAME) \ ((void) ((NAME) = (__libc_lock_recursive_t) _LIBC_LOCK_RECURSIVE_INITIALIZER)) #else @@ -78,7 +78,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; #endif /* Finalize recursive named lock. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) # define __libc_lock_fini_recursive(NAME) ((void) 0) #else # define __libc_lock_fini_recursive(NAME) \ @@ -86,7 +86,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; #endif /* Lock the recursive named lock variable. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) # define __libc_lock_lock_recursive(NAME) \ do { \ void *self = THREAD_SELF; \ @@ -103,7 +103,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; #endif /* Try to lock the recursive named lock variable. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) # define __libc_lock_trylock_recursive(NAME) \ ({ \ int result = 0; \ @@ -128,7 +128,7 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; #endif /* Unlock the recursive named lock variable. */ -#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) +#if defined _LIBC && (!defined NOT_IN_libc || IS_IN (libpthread)) /* We do no error checking here. */ # define __libc_lock_unlock_recursive(NAME) \ do { \ diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h index 5351a51b11..ae17507c99 100644 --- a/sysdeps/nptl/bits/libc-lockP.h +++ b/sysdeps/nptl/bits/libc-lockP.h @@ -35,7 +35,7 @@ #include <pthread-functions.h> /* Mutex type. */ -#if defined NOT_IN_libc && !defined IS_IN_libpthread +#if defined NOT_IN_libc && !IS_IN (libpthread) typedef pthread_mutex_t __libc_lock_t; #else typedef int __libc_lock_t; @@ -69,7 +69,7 @@ typedef pthread_key_t __libc_key_t; initialized locks must be set to one due to the lack of normal atomic operations.) */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # if LLL_LOCK_INITIALIZER == 0 # define __libc_lock_define_initialized(CLASS,NAME) \ CLASS __libc_lock_t NAME; @@ -125,7 +125,7 @@ typedef pthread_key_t __libc_key_t; /* Initialize the named lock variable, leaving it in a consistent, unlocked state. */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # define __libc_lock_init(NAME) \ ((void) ((NAME) = LLL_LOCK_INITIALIZER)) #else @@ -144,7 +144,7 @@ typedef pthread_key_t __libc_key_t; /* Finalize the named lock variable, which must be locked. It cannot be used again until __libc_lock_init is called again on it. This must be called on a lock variable before the containing storage is reused. */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # define __libc_lock_fini(NAME) ((void) 0) #else # define __libc_lock_fini(NAME) \ @@ -158,7 +158,7 @@ typedef pthread_key_t __libc_key_t; #endif /* Lock the named lock variable. */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # ifndef __libc_lock_lock # define __libc_lock_lock(NAME) \ ({ lll_lock (NAME, LLL_PRIVATE); 0; }) @@ -174,7 +174,7 @@ typedef pthread_key_t __libc_key_t; __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0) /* Try to lock the named lock variable. */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # ifndef __libc_lock_trylock # define __libc_lock_trylock(NAME) \ lll_trylock (NAME) @@ -193,7 +193,7 @@ typedef pthread_key_t __libc_key_t; __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) /* Unlock the named lock variable. */ -#if !defined NOT_IN_libc || defined IS_IN_libpthread +#if !defined NOT_IN_libc || IS_IN (libpthread) # define __libc_lock_unlock(NAME) \ lll_unlock (NAME, LLL_PRIVATE) #else diff --git a/sysdeps/sparc/sparc32/lowlevellock.c b/sysdeps/sparc/sparc32/lowlevellock.c index 8384281c3a..78cfad92ac 100644 --- a/sysdeps/sparc/sparc32/lowlevellock.c +++ b/sysdeps/sparc/sparc32/lowlevellock.c @@ -37,7 +37,7 @@ __lll_lock_wait_private (int *futex) /* These functions don't get included in libc.so */ -#ifdef IS_IN_libpthread +#if IS_IN (libpthread) void __lll_lock_wait (int *futex, int private) { diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 17dad91819..68b06e1739 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -373,7 +373,7 @@ __LABEL(name) \ # include <stdint.h> # if (defined IS_IN_rtld \ || (!defined SHARED && (!defined NOT_IN_libc \ - || defined IS_IN_libpthread))) + || IS_IN (libpthread)))) extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h index 9e347de390..f2f8009b3c 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h +++ b/ |
