basic thread question

Daniel Eischen eischen at pcnet1.pcnet.com
Fri May 23 07:57:32 PDT 2003


On Fri, 23 May 2003, Petri Helenius wrote:

> 
> In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix threads program 
> so I would get more than one thread scheduled on a SMP machine? Is there a document
> somewhere or does it "just work" ?

Either link to libkse or libthr (-lkse or -lthr).  Don't use
libc_r (-pthread or -lc_r).  Libkse will set the concurrency
to the number of CPUs in your system.  You can also use
scope system threads with libkse.

libthr will create each thread in its own KSE, and is more
like Linuxthreads (1:1) model.  libkse is M:N.

-- 
Dan Eischen



More information about the freebsd-threads mailing list