testandset
I remember Wilcox saying:
"
Because we can't implement testandset atomically & efficiently on hppa. The places which use testandset actually just need trylock. "
Was the old testandset changed to try_lock in pt-machine.h for hppa?
I see that they are the same asm statement (i.e. just an ldcw).
pt-machine.h:old:
testandset (int *spinlock)
{
int ret;
__asm__ __volatile__(
"ldcw 0(%2),%0"
: "=r"(ret), "=m"(*spinlock)
: "r"(spinlock)); return ret == 0;
}
pt-machine.h:new:try_lock(__atomic_lock_t *spinlock)
{
int ret;
__asm__ __volatile__(
"ldcw 0(%2),%0"
: "=r"(ret), "=m"(*spinlock)
: "r"(spinlock)); return ret == 0;
}
Same...
I'm sitting scratching my head becaues the ./sysdeps/hppa/dl-fptr.c is peppered with testandset, which used to be in pt-machine.h, but is now called try_lock within pt-machine.h
Which is my current reason that glibc-2.2.4 failes to build Because dl-fptr.c makes use of testandset, which is no longer in pt-machine.h.
Do I have something backwards?
I'm starting to think that I should take a look at dpkg-buildpackage, and if I'm using it all properly.
---
Matthew,
Since I can't quite get to the point where zic barfs while walking the timezones... I'm not much help ;)
c.
Quoted 3 lines · Carlos O'Donell Jr.
I'm sitting scratching my head becaues the
./sysdeps/hppa/dl-fptr.cis peppered with testandset, which used to be inpt-machine.h, but is now calledtry_lockwithinpt-machine.h
um, the hppa.dpatch definitely does patch this. perhaps you were overzealous with trimming the ia64 part of the patch?
Signature · 1 line
Revolutions do not require corporate support.
Quoted 7 lines
Quoted 3 lines
I'm sitting scratching my head becaues the
./sysdeps/hppa/dl-fptr.cis peppered with testandset, which used to be inpt-machine.h, but is now calledtry_lockwithinpt-machine.hum, the hppa.dpatch definitely does patch this. perhaps you were overzealous with trimming the ia64 part of the patch?
Hrm. Maybe. I remember cutting out only the ia64 part. I'll zip through the patch again.
<carlos goes to check>
Hrm. Time to start vaping source trees.
The only diff from the patches is the ia64 stuff. Which I've fixed to use try_lock, so it's not necc anymore.
I am now sure that I've been using the dpkg tools incorrectly. I will follow the steps you've outlined and do some more reading.
Thanks for the help M.
Cheers,
c.