Skip site navigation (1)Skip section navigation (2)
Date:      06 Oct 2002 21:28:48 +0200
From:      Andreas Kohn <andreas.kohn@gmx.net>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: XFree86 and threads
Message-ID:  <1033932529.84206.49.camel@klamath.ankon.homeip.net>
In-Reply-To: <20021005202301.A672@pera.home>
References:  <20021005202301.A672@pera.home>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2002-10-05 at 20:23, Aleksandar B. Samardzic wrote:
> I learned hard way (digging through XFree86 sources) that in order to
> have OpenGL programs properly rendered on FreeBSD 4.6-RELEASE I have to
> link with reentrant version of standard C library (libc_r). Eventually,
> problem was located in __glXGetCurrentContext() function in
> xc/xc/lib/GL/glx directory of XFree86 source distribution. Right there,
> xthread_key_create() function, that is in turn actually
> pthread_key_create(), doesn't properly create thread key that should be
> used to store rendering context with thread. When trying to get
> rendering context using this key later in code, no valid context is
> retrieved and GLX requests are not propagated to server. Strange is that
> pthread_key_create() returns 0, i.e. success indicator. Now, got two
> questions:
> 
> 1. Is anywhere in documentation mentioned that OpenGL programs
>    (actually, all X11 programs) have to be linked with libc_r (I wasn't
>    able to found something alike)?
> 2. Is above pthread_key_create() behavior a bug?
> 
> Thanks.
> 
Thanks! I always thought my OpenGL programs didn't like me...with -lc_r
everything works as expected.

--Andreas.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1033932529.84206.49.camel>