This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/4] Assume LLL_LOCK_INITIALIZER is 0
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Yann Droneaud <ydroneaud at opteya dot com>, libc-alpha at sourceware dot org
- Date: Mon, 29 Apr 2019 09:13:21 -0300
- Subject: Re: [PATCH 3/4] Assume LLL_LOCK_INITIALIZER is 0
- References: <20190222192703.18177-1-adhemerval.zanella@linaro.org> <20190222192703.18177-3-adhemerval.zanella@linaro.org> <baad2e9d22068cf5ac24f8cb226e0095965129ca.camel@opteya.com>
On 29/04/2019 06:38, Yann Droneaud wrote:
> 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.
>
Indeed, I have added it on my local branch. Thanks for checking on this.