Thread Local Storage & i386-gnu (Was: Re: [PATCH] Add _dl_init_first to elf/Versions)

Jeroen Dekkers jeroen@dekkers.cx
Mon Apr 8 07:39:00 GMT 2002


On Sun, Apr 07, 2002 at 06:09:40PM -0400, Roland McGrath wrote:
> The reason _dl_init_first is special is that our version for cthreads has
> to be able to switch stacks and move the arguments from the old stack.
> Normal initializers are called from inside a few stack frames that would
> make that all screw up.  The need for this will go away when we get rid of
> cthreads and use the thread register so that the main thread can have its
> original stack.

Did you already made up your mind what the way to go is? If I remember
correctly you suggested in some post to libc-hacker a few months ago
to implement it using an constant segment register pointing to a word
which is changed at thread switch and that word is the pointer to the
thread specific data.

Jeroen Dekkers
-- 
Jabber supporter - http://www.jabber.org Jabber ID: jdekkers@jabber.org
Debian GNU supporter - http://www.debian.org http://www.gnu.org
IRC: jeroen@openprojects
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20020408/cbfa3be7/attachment.sig>


More information about the Libc-alpha mailing list