[linux-audio-dev] GThread vs. pthread
Pete Bessman
ninjadroid at gazuga.net
Sat Jun 12 16:51:09 UTC 2004
At 12 Jun 2004 00:09:05 -0500,
Jack O'Quin wrote:
>
> Pete Bessman <ninjadroid at gazuga.net> writes:
>
> > One more point in favor of GThread I just figured out is config
> > testing for it. All you have to do is at a pkg-config check for
> > gthread-2.0 and your set. Having glanced through other programs,
> > checking for pthreads seems a bit more involved than I care to be
> > (read: not at all, I hate the fscking autotools). So, I think
> > I'll roll with GThread.
>
> Not a very strong reason. Checking for pthreads is a little tricky,
> but hardly rocket science. These checks (from JACK) work for quite a
> few platforms, though I'm sure there are others one could add...
>
> AC_CHECK_HEADER(/usr/include/nptl/pthread.h,
> [CFLAGS="$CFLAGS -I/usr/include/nptl"])
>
> AC_CHECK_FUNC(pthread_create, [],
> AC_CHECK_LIB(pthread, pthread_create, [],
> AC_MSG_ERROR([*** JACK requires POSIX threads support])))
Touche. Since you did all the hard work for me, and pthreads isn't
OOPy like GThreads, I'll stick with pthreads :-)
> There is also a conditional check for pthread_barrier_init().
Well, I don't even know wtf that is, so I think I'll be ok without it.
[pb]
More information about the Linux-audio-dev
mailing list