[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thread Local Storage & i386-gnu (Was: Re: [PATCH] Add _dl_init_first
From: |
Roland McGrath |
Subject: |
Re: Thread Local Storage & i386-gnu (Was: Re: [PATCH] Add _dl_init_first to elf/Versions) |
Date: |
Sun, 7 Apr 2002 18:47:50 -0400 (EDT) |
I changed the CC to recipients appropriate for Hurd discussion.
Yes, I've decided what to do. In fact, I should do it already.
It's already specified that the "thread register" is one word at %gs:0.
We can implement this now with a per-thread LDT using the existing Mach
interfaces, but I think that is overkill. What I'm going to do is change
the standard user-mode %gs to a new special global segment that will point
to one word in user-writable memory above VM_MAX_ADDRESS. (The
segmentation limits on the other user-usable segments prevent any other way
of writing to that page.) For SMP, there will be a USER_GS segment on each
CPU pointing to different locations.
Then thread switching will switch this word as if it were a register.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Thread Local Storage & i386-gnu (Was: Re: [PATCH] Add _dl_init_first to elf/Versions),
Roland McGrath <=