Subject: Re: Native thread support
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-x11
Date: 01/19/2003 13:42:29
Jason R Thorpe <thorpej@wasabisystems.com> writes:

> Yah, that's a good idea.  We could just use the exiting _'d names, and
> expose them from <thr.h> or something ... But we need to some up with
> something intelligent for the _thr_once() routine to do, etc.  Right now
> it bombs if __isthreaded == 0.

Well, if threads aren't present, _thr_once() can call its function and
set the flag, since there are no races or concurrency to worry
about... roughly, only the functions that are practical no-ops in the
absense of threads should be exposed this way (pthread_mutex_*,
pthread_cond_signal/broadcast, but not pthread_create).

        - Nathan