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

Re: Fast thread-local storage for OpenGL drivers



Gareth Hughes wrote:
It is critically important for OpenGL drivers to have fast
(single-instruction) access to thread local variables. ...
While glibc's new thread library implementation has many benefits,
particularly to application programmers (with support for the new keyword
'__thread', and so on), it basically forces a function call per thread local
variable access for situations like the one I described above. ...
Comments, questions are welcome.

Hi Gareth, I forwarded your note to the NPTL mailing list. Roland McGrath replied, and suggests that you might want to reread the TLS paper (I think he's referring to http://people.redhat.com/drepper/nptl-design.pdf, which appears to be offline at the moment); also look at the GCC implementation of __thread, and note -ftls-model and __attribute__ ((tls_model)).

If that didn't make any sense, it's probably because I mangled Roland's words;
you might want to ask him what he meant.
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045





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