On Monday 02 March 2009 09:23:59 Michael Schnell wrote:
> > TLS "Thread Local Storage" is the ability to say
> >
> >     int __thread i;
>
> I see ! Does   using TLS  create fast code or will there be a library
> call done for any access to "i" ?

i dont know of any port that implements TLS via a library call, but how each 
port does TLS is highly port specific

> When I was thinking about the multithreaded application I am planning, I
> found that I need a thread to know some unique ID. (I'll have multiple
> threads that use the same code, so sometime they need to know which one
> they are.).
>
> I see that this can be done with TLS.

yes

> Do you suggest that TLS is not available in a uCLinux system ?

TLS has nothing to do with mmu or no-mmu.  they are special relocations that 
are generated/resolved by the toolchain.

> Is there any other way to have a unique thread ID that the thread can
> _easily_and_fast_ access ?

there is probably always a way to hack something together, but TLS is the only 
"portable" solution.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to