This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: thread_self() and STACK_GROWS_UP
- From: "Will Newton" <will dot newton at gmail dot com>
- To: "Daniel Jacobowitz" <drow at false dot org>
- Cc: libc-ports at sourceware dot org
- Date: Mon, 5 Jun 2006 13:33:06 +0100
- Subject: Re: thread_self() and STACK_GROWS_UP
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=F5abM5lFuvOkSxd6ekYG12a4hTlsS2dSoVUWHbpa7s7/COytryLVa1u20rq4Q/B/ZYQXkHslL7o7W+pEV4rcxbvWm4KLCGX497JApymdFRBBOC4BOMoZhaLU8Z1UKVpt8NDSKc8+yq5gK3SeyCESABtR+NHtcZZUhqTegXCqDE4=
- References: <87a5b0800605090422j4ba06a69wed795414ede62623@mail.gmail.com> <20060602170654.GA31443@nevyn.them.org> <87a5b0800606050146n7dbee844xbef3278f760a1bf2@mail.gmail.com> <20060605122822.GA16139@nevyn.them.org>
On 6/5/06, Daniel Jacobowitz <drow@false.org> wrote:
Not especially, no. Thread stacks don't need to be anywhere in
particular, and LinuxThreads normally allocates them with mmap. So
why put them "above" your initial thread stack, instead of letting that
mmap put them in the heap, as it would do by default?
As I understand it this is "FLOATING_STACKS" and requires a working
thread_self() so you can find your TCB? Without a thread_self() don't
we mask the stack pointer to find the TCB? I'm not sure it is possible
to mmap stacks without thread_self(), but if I could that would be
very useful.
It's that layout difference which is messing you up, not the fact that
your stack grows up.
The layout difference with what? Is there another port that has an
upward growing stack but no thread_self()?