Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jul 1998 08:09:39 +1200 (NZST)
From:      Joe Abley <jabley@clear.co.nz>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   pthreads
Message-ID:  <Pine.BSF.3.96.980702080311.2083A-100000@buddha.clear.net.nz>

next in thread | raw e-mail | index | archive | help
Hi all,

Does anybody know the background of posix thread support in FreeBSD? I
can't seem to find any docs on the background anywhere...

I'm interested in a couple of issues.

1. On Solaris, to compile a pthreaded program, I stick a

  #define _REENTRANT
  #include <pthread.h>

at the top of the source files, and link with -lpthread. With FreeBSD the
linking phase is more involved, since I need to exclude the standard C
libraries and link with libc_r instead.

Why was the decision made to support pthreads in this manner? What
benefits does this have over the Solaris way of doing things?

2. Should I really be using the 2.2.6-RELEASE libc_r pthread support, or
should I be looking at Chris Provenzano's pmpthreads?

I'm by no means any kind of expert on posix threads; I've just been
working on some code which compiled but refused to run properly on
FreeBSD. Moving the code to Solaris (and removing all the nice BSD
networking code which Sun have seen fit not to support on Solaris), it
compiled and worked fine, no problems.

I'm not asking for help with my code... Just some pointers on the history
of pthread support in FreeBSD.


Joe

--
Joe Abley <jabley@clear.co.nz>      Tel +64 9 912-4065, Fax +64 9 912-5008
Network Architect, CLEAR Net                      http://www.clear.net.nz/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980702080311.2083A-100000>