From owner-freebsd-stable Sun Oct 6 12:28:43 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 647DC37B401 for ; Sun, 6 Oct 2002 12:28:42 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5343443E65 for ; Sun, 6 Oct 2002 12:28:41 -0700 (PDT) (envelope-from andreas.kohn@gmx.net) Received: (qmail 23750 invoked by uid 0); 6 Oct 2002 19:28:40 -0000 Received: from unknown (HELO ankon-intern.homeip.net) (212.204.32.190) by mail.gmx.net (mp001-rz3) with SMTP; 6 Oct 2002 19:28:40 -0000 Subject: Re: XFree86 and threads From: Andreas Kohn To: freebsd-stable@FreeBSD.ORG In-Reply-To: <20021005202301.A672@pera.home> References: <20021005202301.A672@pera.home> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 06 Oct 2002 21:28:48 +0200 Message-Id: <1033932529.84206.49.camel@klamath.ankon.homeip.net> Mime-Version: 1.0 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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