[fpc-devel] OO rewrite - technical questions
Michael Schnell
mschnell at lumino.de
Tue Jul 20 11:45:59 CEST 2010
On 07/20/2010 11:16 AM, Florian Klaempfl wrote:
> Michael Schnell schrieb:
>> AFAIK, in Linux the archs specs define which register is supposed to be
>> used as a theradvar pointer by compilers. There might be some archs that
>> don't define a register but a dedicated memory location, managed by the
>> OS when scheduling threads and processes, to be the threadvar pointer.
> Where can be a detailed specification of this found?
I found these:
http://stackoverflow.com/questions/1460483/on-which-platforms-is-thread-local-storage-limited-and-how-much-is-available
http://www.linux-mips.org/wiki/NPTL
> How does it handle
> dyn. loaded libs using thread vars?
The just compiler addresses the threadvars relative to a register
instead of the pointer to the global area with normal globals. (Or
with X86/32 using another segment register instead of the default DS).
So regarding the code it's just another Global area, in realtime the
base of same is switching automatically when the thread is scheduled.
-Michael
More information about the fpc-devel
mailing list