threading in FreeBSD (acx_pthreads)

Karl H. Beckers karl.h.beckers at gmx.net
Mon Feb 4 15:05:59 PST 2008


Am Montag, den 04.02.2008, 14:56 -0500 schrieb John Baldwin:
[...]
> > And I take it that (c) is what your ports system is doing and the
> > discussion is around whether that's the right thing to do?
> 
> Just -pthread, no -lc_r.  On 4.x -pthread expands to -D_REENTRANT -lc_r (or 
> something like that).  On 5.x+ -pthread expands to -lpthread.  IOW, -pthread 
> always expands to the appropriate system default.  If you want to use libthr 
> on 6.x then you can either explicitly say -lthr instead of -pthread or rename 
> libpthread to libkse and symlink libpthread to libthr.  (Or use libmap.conf 
> to map libpthread to libthr, etc.).
> 
> Also, FWIW DES, at work when folks did benchmarks for Java stuff on 6.x, 
> libkse had better performance than libthr.  Granted, Java is a bit more of an 
> odd benchmark b/c it is thread happy and thus more suited to a M:N model than 
> most other threading workloads.
> 

OK,

that clears some of that up.

Any idea what the original author of acx_pthreads has meant by -lkthread
and lthread? (Am trying to ask him himself, but his spamassassin doesn't
like me ;) )

Thanks,

Karl.



More information about the freebsd-threads mailing list