NVIDIA and TLS

Daniel Eischen eischen at pcnet.com
Mon Jun 16 13:11:01 PDT 2003


On Sat, 14 Jun 2003, Andy Ritger wrote:
> 
> I'd like to add a few comments to what has recently been said here
> and on freebsd-current to clarify what the %gs register is used
> for by the NVIDIA driver and what ideally would be done to allow
> the NVIDIA driver to coexist with FreeBSD threading implementations.
> 
> The NVIDIA driver does not need %gs to maintain internal state in the
> kernel; rather, it uses it to maintain fast thread local data for the
> OpenGL implementation, where it is critically important to have fast
> (single instruction) access to such data.

Take 2.  After thinking a bit more...

I guess OpenGL (or OpenGL implementation interfaces to the
NVIDIA driver) doesn't have thread-safe interfaces.  Instead
of trying to change the interface of the OS, why not change
(or add) OpenGL or NVIDIA driver interfaces so that there
is not a need for TLS?

-- 
Dan Eischen



More information about the freebsd-threads mailing list