This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [Dri-devel] Re: OpenGL and the LinuxThreads pthread_descr structure
On Mon, May 20, 2002 at 12:02:31AM -0700, Ulrich Drepper wrote:
| On Thu, 2002-05-16 at 20:08, Gareth Hughes wrote:
| > I disagree that __thread is the best you can ever get. In the best
| > case, you have an extra load and subtraction before you have the address
| > of a thread-local variable. In the worst case, you have a function call
| > in there as well.
|
| If you define your variable correctly using __thread can be as efficient
| as anything else.
Hi, Ulrich. Could you elaborate a bit on how to correctly use __thread
so that the extra instructions Gareth mentioned aren't needed?
Allen