Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Oct 2002 20:23:01 +0200
From:      "Aleksandar B. Samardzic" <a.samardzic@matf.bg.ac.yu>
To:        freebsd-stable@FreeBSD.ORG
Subject:   XFree86 and threads
Message-ID:  <20021005202301.A672@pera.home>

next in thread | raw e-mail | index | archive | help
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.

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?20021005202301.A672>