[PATCH] hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.

Mike Frysinger vapier@gentoo.org
Tue Mar 11 06:06:00 GMT 2014


On Wed 05 Mar 2014 00:11:01 Carlos O'Donell wrote:
> This is one of a several NPTL patches to build glibc on hppa.
> 
> The pthread_attr_[sg]etstack functions are defined by POSIX as
> taking a stackaddr that is the lowest addressable byte of the
> storage used for the stack. However, the internal iattr variable
> of the same name in NPTL is actually the final stack address
> as usable in the stack pointer for the machine. Therefore the
> NPTL implementation must add and subtract stacksize for
> _STACK_GROWS_DOWN architectures. HPPA is a _STACK_GROWS_UP
> architecture and doesn't need to add or subtract anything,
> the stack address *is* the lowest addressable byte of the
> storage.
> 
> Tested on hppa-linux-gnu, with no regressions.
> 
> Can't impact any other targets because of the conditionals.
> 
> If nobody objects I'll check this in at the end of the week.
> 
> I can't see there being any objections to this patch except
> that it introduces more code to maintain for an old architecture
> (perhaps we'll get another _S_G_U target in the future?).

other than the #if vs #ifdef weirdness, LGTM.  Gentoo has been shipping this 
for hppa since at least glibc-2.11, and has been using it on all arches since 
glibc-2.17 (which is our current stable).  no reports of weirdness yet.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140311/0647008e/attachment.sig>


More information about the Libc-alpha mailing list