This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Get rid of __LT_SPINLOCK_INIT
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 17 Mar 2014 18:35:10 -0400
- Subject: Re: [PATCH] Get rid of __LT_SPINLOCK_INIT
- Authentication-results: sourceware.org; auth=none
- References: <20140317135545 dot GM1850 at spoyarek dot pnq dot redhat dot com> <CANu=DmjdkLPDOv1eT94ETnG3pq2ne8HpQaeNP9DP6K6rXKQzkA at mail dot gmail dot com> <53271546 dot 4000709 at linux dot vnet dot ibm dot com> <20140317153900 dot GN1850 at spoyarek dot pnq dot redhat dot com>
On 03/17/2014 11:39 AM, Siddhesh Poyarekar wrote:
> On Mon, Mar 17, 2014 at 12:31:18PM -0300, Adhemerval Zanella wrote:
>> Carlos O'Donnel is the maintainer for hppa. However, if you ever check on
>> GLIBC (a simple grep), you will see __LT_SPINLOCK_INIT is never defined in
>> any arch config file and it was only defined by when glibc used linuxpthread.
>> So I think it safe to just get rid of it.
>
> That's what I did, in addition to trying to figure out when it got
> added in, which led me to the hppa bits too.
The hppa port no longer needs __LT_SPINLOCK_INIT. As of NPTL we switched
to zero-initialized locks to avoid the terrible headache of teaching
developers that calloc() is not the right way to initialize a mutex,
despite it working on x86*.
We used to have one-initialized locks because hppa's only atomic operation
is load-and-clear-word, and because of that we had our own special
initialization in LinuxThreads.
Cheers,
Carlos.