bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stack base and thread-specific data


From: Roland McGrath
Subject: Re: Stack base and thread-specific data
Date: Wed, 8 Aug 2001 15:53:01 -0400 (EDT)

The fixed-alignment stacks assumption is a bad one.  That is an
implementation details of cthreads that you should not presume one way or
another.  In a proper pthreads implementation, stacks can be sized and
located arbitrarily, so the mechanism of storing data at the base of the
stack is not viable.  Thread-specific data is usually implemented with a
per-thread global register, or on the x86 the equivalent using a specially
set up segment register.  You can see how this is done in linuxthreads,
and you can see the mach_i386 interfaces for setting up an LDT in Mach.
You're going to need to understand all this stuff fully to implement pthreads.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]