This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [Dri-devel] OpenGL and the LinuxThreads pthread_descr structure
- From: Keith Whitwell <keith at tungstengraphics dot com>
- To: idr at us dot ibm dot com
- Cc: Gareth Hughes <gareth dot hughes at acm dot org>, libc-alpha at sources dot redhat dot com, "DRI developer's list" <dri-devel at lists dot sourceforge dot net>
- Date: Fri, 17 May 2002 17:06:45 +0100
- Subject: Re: [Dri-devel] OpenGL and the LinuxThreads pthread_descr structure
- References: <3CE4359C.2030209@acm.org> <20020517090049.B17940@eng2.beaverton.ibm.com>
Ian Romanick wrote:
>
> On Thu, May 16, 2002 at 03:41:32PM -0700, 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, so that they can
> > be made thread-safe without any impact on performance. Indeed, using
> > this mechanism, an OpenGL driver can ignore the difference between
> > running with a single thread and running with multiple threads, as
> > "global" data will be accessed in the same way independent of the number
> > of threads running.
>
> Please forgive my lack of understanding of the relevent issues. It seems to
> me that this issue (or a closely related issue) has been brought up in the
> past, and was brutally slain by Linus. Admittedly, a lot has changed in the
> Linux world in 2+ years, but could someone explain how this proposal relates
> to this earlier request:
>
That's quite a different approach, and really overkill -- libGL doesn't need
whole different virtual memories per thread, just a quick way to get two
pointers. The thread-local storage already exists and is laying unused...
Keith