Quoth Jamie Lokier:
> Some arches have a page which is per-thread, called the vsyscall/vdso
> kernel page.  User-space calls routines in that page.  In that page, a
> pointer to the TLS area might be stored, swapped on context switch by
> the kernel, and retrieved by calling a routine at a fixed address in
> the page.
[...]
> On no-MMU architectures, the "swap on context switch" method with vdso
> kernel page can still be used, but generally it isn't because NPTL TLS
> is implemented alongside ELF DSO support, and that's always been done
> so far using a dedicated register on no-MMU architectures (FDPIC).

It should be easy enough to get it to work with a dedicated register, too.  
Just have the kernel set the register on
context switch, where it always points to a "thread-specific-data" table in 
memory at different locations for different
threads.  (This would also work for userspace threads.)  Of course, the 
compiler would have to be convinced to leave
that register alone, similar to how it already behaves with the stack pointer 
and frame pointer registers.


_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to