threading in FreeBSD (acx_pthreads)

Dag-Erling Smørgrav des at des.no
Mon Feb 4 07:08:58 PST 2008


"Karl H. Beckers" <karl.h.beckers at gmx.net> writes:
> I'm trying to move my configure.in from manual threading libs detection
> to acx_pthreads [...]

I have no idea what acx_pthread is, but judging from your description,
it doesn't seem to do a very good job.  There's nothing wrong with
manual detection - see how Varnish does it:

http://varnish.projects.linpro.no/browser/trunk/varnish-cache/configure.ac

Note that the correct idiom according to POSIX is -lpthread, so that
should in theory work on all POSIX platforms.  The reason why Varnish
checks for -lthr explicitly is that there are FreeBSD versions where
-lpthread defaults to -lkse instead of -lthr, and -lkse has proven to
break rather badly under load.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-threads mailing list