Re: [linux-audio-dev] GThread vs. pthread

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] GThread vs. pthread
From: Jack O'Quin (joq_AT_io.com)
Date: Sat Jun 12 2004 - 08:09:05 EEST


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])))

There is also a conditional check for pthread_barrier_init().

-- 
  joq


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Jun 12 2004 - 08:04:03 EEST