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] Get rid of __LT_SPINLOCK_INIT


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.


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