>>>>> "drepper" == Ulrich Drepper <[EMAIL PROTECTED]> writes:
drepper> int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t
drepper> stacksize)
OK, thanks. I still think I see two problems:
First, manager.c:pthread_allocate_stack() needs to set
__pthread_nonstandard_stacks to 1 if the user provided a stack.
Otherwise, if the user provides a stack which is not aligned to a
multiple of 2M the default thread_self() implementation will not
correctly find the thread data. I am pretty sure this is an outright
bug (though easy to fix). Actually, you only need set it if the value
provided by the user is not aligned to a STACK_SIZE boundary, I think.
Second, the value passed to pthread_attr_setstacksize is limited to 2M
(see manager.c line 263). In other words, each thread (including the
first) is still limited to a stack size of 2M, despite the usual
kernel limit of 8M. There should be some way to get stack sizes of 8M
with sentinels. I would even argue that this should be the default,
and that users who need many many threads can write something special
to notify the library. But even if it is not the default, there
should be *some* way to get the effect.
Yes, I can use pthread_attr_setstackaddr, but what if I need
sentinels? Do I need to play mmap() games (and if so, how exactly
should I play them)? It would be nice to have an interface for this,
even a Linux-specific one.
- Pat