This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: thread_self() and STACK_GROWS_UP


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()?


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