This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: pthreads in Linux


> In the code, I
> saw that for non-standard stacks, in thread_self,
> it just parses through the whole list of pthread
> stacks to match one with the current sp.

Yes, I believe this is the case, but only if the thread descriptor
can't be retrieved by other means.  If glibc is compiled for i686 on
recent Linux kernels for example, a specific register is used to hold
the thread descriptor, and the list of stacks is _not_ traversed.

> 'coz we
> are concerned this might causes performance
> problems for us,

Really?  Why do you need user-defined stacks, and so many of them?
IMHO there is very rarely a justification for user-defined stacks, and
the POSIX semantics are not very friendly..  In particular, you cannot
safely re-use the memory areas for thread stacks, because `thread
termination' isn't well defined.

Regards,
Wolfram.


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