This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Assume LLL_LOCK_INITIALIZER is 0


Le vendredi 22 février 2019 à 16:27 -0300, Adhemerval Zanella a écrit :
> Since hppa is not an outlier anymore regarding LLL_LOCK_INITIALIZER value,
> we can now assume it 0 for all architectures.
> 
> Checked on a build for all major ABIs.
> 
> 	* nptl/old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0):
> 	Assume LLL_LOCK_INITIALIZER being 0.
> 	* nptl/old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
> 	* nptl/old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
> 	Likewise.
> 	* nptl/old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
> 	* sysdeps/nptl/libc-lockP.h (__libc_lock_define_initialized): Likewise.
> ---
>  nptl/old_pthread_cond_broadcast.c |  9 ---------
>  nptl/old_pthread_cond_signal.c    |  9 ---------
>  nptl/old_pthread_cond_timedwait.c |  9 ---------
>  nptl/old_pthread_cond_wait.c      |  9 ---------
>  sysdeps/nptl/libc-lockP.h         | 17 +++--------------
>  5 files changed, 3 insertions(+), 50 deletions(-)
> 
> 

Proposed changes are fine for me.

If LLL_LOCK_INITIALIZER is known to be 0 the following statement in 
__pthread_initialize_minimal_internal() from nptl/nptl-init.c could be
removed:

  if (LLL_LOCK_INITIALIZER != 0)
    THREAD_SETMEM (pd, lock, LLL_LOCK_INITIALIZER);

Regards.

-- 
Yann Droneaud
OPTEYA



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]