[linux-audio-dev] GThread vs. pthread
iainduncan at telus.net
iainduncan at telus.net
Sat Jun 12 19:15:41 UTC 2004
Another advantage if you're new to it as I am, is that there are some very
good books on pthreads. And you can look at the Ardour and Softwerk code. ; )
The O'Reilly book is old ( '96 ) but very clearly written and readable. Of
course because it's old you can probably find it at the library.
Iain
> 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