Josh DuBois <[EMAIL PROTECTED]> writes:

>    My first question to the group is: does anyone know of a good place
> to put the TEB thread-info structures on the PPC architecture?  On Intel
> they get stored in the fs register, and on non-intel sparc there's some
> thread-local storage pointer the OS gives you.  It _looks_ like
> linuxthreads for PPC puts all its thread info in a big list, so that's
> what I've done (in a hacky way) for linuxppc.  I feel like it should
> change eventually, though (I'm just shooting for something that works
> for the time being) because finding the current thread means getting a
> pointer you think is on the stack and then searching the whole list for
> a TEB with a stack that could contain that pointer.  Seems slow.
>    
>    Does anyone know of a really _good_ place to put these on the PPC?

Windows uses register %r13 for this. It may be available under linux
too, that depends on how the system libraries have been compiled,
since there are several gcc options controlling what %r13 is used for.

-- 
Alexandre Julliard
[EMAIL PROTECTED]

Reply via email to