Subject: Re: Native thread support
To: Nick Hudson <skrll@netbsd.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-x11
Date: 01/18/2003 12:11:25
Nick Hudson <skrll@netbsd.org> writes:

> I'm running X from a xsrc tree built with attached diff from mrg and 
> everything seems OK.

So, I've been running a couple of my systems for a while with a
similar patch, and it also seems okay, but I have a couple of concerns...

first, I don't know what the benefit is. A little looking around in
libX11 found display-locking code, but it's not clear to me when that
would be useful... from a multithreaded program that makes X calls
from multiple threads? Is there anything that is known to fail without
this?

second, this will pull libpthread into every X-using application,
whether it is threaded or not, even though X just wants mutexes and
condition variables. I'm concerned that this will cause some problems;
it will impose the libpthread stack-size limit on programs with no
need for that limit, and it will interfere with programs that are
linked against a different libpthread (pth, for example) for whatever
reason.

This may be a good reason to have libc export it's dummy pthread
stubs, so that X11 can link against it and libpthread isn't actually
pulled in unless a program is really threaded.

        - Nathan