Subject: Re: ThreadedX patch, take 2
To: Chris Gilbert <>
From: Eric Anholt <>
List: tech-userlevel
Date: 01/20/2003 13:10:26
On Mon, 2003-01-20 at 03:29, Chris Gilbert wrote:
> On Sun, 19 Jan 2003 21:48:25 -0800
> Jason R Thorpe <> wrote:
> > So, assuming bleeding edge xsrc and bleeding edge src, the following
> > patch seeems to DTRT with regards to pulling in stubs for non-threaded
> > apps, and the real routines for threaded apps.  Patch against
> > xsrc/xfree.
> Have you looked at the builtin X11 thread stub, which seems to be
> available via adding:
> #  define BuildThreadStubLibrary  YES 
> to the file.
> It then causes xc/lib/XThrStub to be built.  Which probably achieves the
> desired effect.  FreeBSD and OpenBSD seem to use it.
> Might also be worth checking out the effect of (although I couldn't find
> it used in any Imakefile, perhaps it's out of date):
> #  define NeedUIThrStubs          YES

FreeBSD used to use the thread stub library (BuildThreadStubLibrary YES,
NeedUIThrStubs YES), but in 5.0 we've added weak references to thread
stubs to libc, which are overridden if libc_r is linked in, so we don't
use libXThrStub any more.

Eric Anholt