diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-11 11:08:00 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-11 11:09:42 +0200 |
commit | d2af73a348c4a230792d190c774a431fe5c31515 (patch) | |
tree | 328dad904fbffb9e48ab2707689a51db2644f307 /nptl/pthreadP.h | |
parent | 5f717849198273153a5d390985157fbf973c4e39 (diff) | |
download | glibc-d2af73a348c4a230792d190c774a431fe5c31515.tar.gz glibc-d2af73a348c4a230792d190c774a431fe5c31515.tar.xz glibc-d2af73a348c4a230792d190c774a431fe5c31515.zip |
nptl: Remove always-disabled debugging support
This removes the DEBUGGING_P macro and the __pthread_debug variable. The __find_in_stack_list function is now unused and deleted as well. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index d9b97c814a..d9a6137bd3 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -243,23 +243,11 @@ libc_hidden_proto (__pthread_tpp_change_priority) extern int __pthread_current_priority (void); libc_hidden_proto (__pthread_current_priority) -/* The library can run in debugging mode where it performs a lot more - tests. */ -extern int __pthread_debug attribute_hidden; -/** For now disable debugging support. */ -#if 0 -# define DEBUGGING_P __builtin_expect (__pthread_debug, 0) -# define INVALID_TD_P(pd) (DEBUGGING_P && __find_in_stack_list (pd) == NULL) -# define INVALID_NOT_TERMINATED_TD_P(pd) INVALID_TD_P (pd) -#else -# define DEBUGGING_P 0 -/* Simplified test. This will not catch all invalid descriptors but - is better than nothing. And if the test triggers the thread - descriptor is guaranteed to be invalid. */ -# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0) -# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0) -#endif - +/* This will not catch all invalid descriptors but is better than + nothing. And if the test triggers the thread descriptor is + guaranteed to be invalid. */ +#define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0) +#define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0) /* Cancellation test. */ #define CANCELLATION_P(self) \ @@ -322,10 +310,6 @@ __do_cancel (void) /* Internal prototypes. */ -/* Thread list handling. */ -extern struct pthread *__find_in_stack_list (struct pthread *pd) - attribute_hidden; - /* Deallocate a thread's stack after optionally making sure the thread descriptor is still valid. */ extern void __free_tcb (struct pthread *pd) attribute_hidden; |