OpenGL and the LinuxThreads pthread_descr structure

Ulrich Drepper drepper@redhat.com
Thu May 16 17:32:00 GMT 2002


On Thu, 2002-05-16 at 15:41, Gareth Hughes wrote:
> I would like to propose a small change to the pthread_descr structure in
> the latest LinuxThreads code, to better support OpenGL on GNU/Linux
> systems (particularly on x86, but not excluding other platforms).  The
> purpose of this patch is to provide efficient thread-local storage for
> both libGL itself and loadable OpenGL driver modules,

glibc already supports the thread-local storage extension to ELF and so
does binutils.  Only gcc support is missing but you can work around this
with asm.  Once gcc has the support you'll be able to write

  __thread some_type some_var;

as if some_var would be a global variable.  In fact it'll be
thread-specific.

This is the only way you'll get access to thread-local storage.  It is
out of question to allow third party program peek and poke into the
thread descriptor.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20020516/f5c657ec/attachment.sig>


More information about the Libc-alpha mailing list