>     Yup, in fact, if I hadn't come up with the __read[gf]sword() trick,
>     my only other option would have been TLS (or the GetCurrentThreadId
>     /pthread_self() approach in the presentation).  TLS is fantastic,
>     and it's definitely an intrinsic part of the solution (the "Y" part
>     of "if we're a parallel thread, do Y"), but it definitely more
>     costly than a simple FS/GS register read.

I think you should be able to just take the address of a static
__thread variable to achieve the same thing in a more portable way.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to