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

Re: NPTL and architectures without thread registers



On Mon, Nov 25, 2002 at 03:30:35PM -0600, Mark Brown wrote:
> Ulrich, you wrote (13 November) in a discussion of pthread_self(),
> pthread_getspecific(), and signal handlers....
> 
> > It already works.  No platform without some form of "thread register"
> > will be supported and the thread register allows access to the thread
> > handle and TSD regardless of the state of stack or interrupt handling.
> 
> Should this be read to mean that NPTL will not be supported (won't work)
> on architectures whose ABIs do not have a thread register? This includes
> IA-32, Alpha, ppc32, x86-64 among others...

It doesn't have to be necessarily a reserved general register, but it can
be some other way moreless as fast as accessing a register.
On IA-32 this is %gs:0 to read the "thread register" (and when not
taking address of some TLS object even %gs:someoffset), on x86-64 this is
similarly %fs:0, on Alpha it is a PAL call which is quite fast too, on SH
it i gbr.
On IA-64, sparc32, sparc64, s390, s390x, ppc64 there is a thread register
reserved by the ABIs.
ppc32 is out of luck unless it changes ABI.
Dunno about arm, cris, hppa, m68k and mips.

	Jakub





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