This is the mail archive of the libc-alpha@sources.redhat.com 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: HPPA port status.


> I did comment on this already.  There is no need to introduce another
> abstraction for the spinlock handling since something like this was
> already added a long time ago and specifically and exclusively for PA.
> Otherwise we wouldn't have __LT_SPINLOCK_INIT etc.  Read the code again.

There are two specific issues involved here, the first is that spinlocks
on HPPA must be initialized to one, and second that they must be 16-byte
aligned. While the use of __LT_SPINLOCK_INIT solves the first issue, the
second issue cannot be solved without some abstraction.

The introduction of an __atomic_lock_t allows an architecture more control 
over the properties of said variable. In this case it allows PARISC  
to use the gcc attribute "__attribute__((aligned (16)))".

For architectures _other_ than PA the patch reduces down to a few 
elementary changes, including:

typedef int __atomic_lock_t;
#define lock_held(p) *(p)

The typedef has allowed PA to align locks, and the second had been used
in generic code to replace "if(lock)" comparisons that would otherwise
evaluate incorrectly (spinlock taken is 0 on PA).

Please read the patch again, it's much smaller than before, and makes
more sense :)

c.


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