basic thread question
Daniel Eischen
eischen at pcnet1.pcnet.com
Fri May 23 15:33:51 PDT 2003
On Fri, 23 May 2003, Craig Rodrigues wrote:
> On Fri, May 23, 2003 at 10:57:30AM -0400, Daniel Eischen wrote:
> > 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.
>
> Hi,
>
> The FreeBSD KSE web page does not mention -lkse, but
> instead it mentions linking against libpthreads.
>
> Does this web page need to be updated? It mentions
> linking against libpthreads and libpthread.
I don't know; it's a question of timing. After -release and
when rtld-elf gets fixed (kan is working on it right now),
it'll go back to being installed as libpthread.
Does this work for you?
Index: index.sgml
===================================================================
RCS file: /home/dcvs/www/en/kse/index.sgml,v
retrieving revision 1.11
diff -u -r1.11 index.sgml
--- index.sgml 3 May 2003 21:17:01 -0000 1.11
+++ index.sgml 23 May 2003 22:32:52 -0000
@@ -58,21 +58,13 @@
the KSE-related changes (the changes are inextricable from the
FreeBSD scheduler).
- <p>In order to use KSE in an application, you need to link it against
- libpthreads, which is not built by default. To build and install it
- on your system, either run <tt>make all install</tt> from
- <span class="filename">/usr/src/lib/libpthread</span> (if you have
- sources installed on your system), or check out the
- <span class="filename">libpthread</span> and
- <span class="filename">libc</span> modules from CVS. You don't need to
- rebuild libc, but the libpthread makefiles refer to parts of the
- libc sources.</p>
-
<p>Linking an application against libpthread is straightforward. In its
makefiles, change the <tt>-pthread</tt> option to <tt>-lpthread</tt>
and relink. Alternatively, you can copy libpthread.so on top of
libc_r.so, but this is not recommended until libpthread.so becomes a
- bit more stable.
+ bit more stable. Please note that at this time, libpthread is installed
+ as libkse to prevent autoconf and the like from picking up libpthread
+ instead of libc_r (use <tt>-lkse<tt> instead of <tt>-lpthread<tt>).
<a name="further.reading"></a>
<h2>Further Reading</h2>
--
Dan Eischen
More information about the freebsd-threads
mailing list