From: David Butenhof <David.Butenhof@compaq.com>
Subject: Re: pthreads for tru64
Date: Mon, 11 Mar 2002 07:29:02 -0500 [thread overview]
Message-ID: <jq1j8.805$fL6.19294@news.cpqcorp.net> (raw)
In-Reply-To: 3C895D0E.1D3D806@opensound.com
4Front Technologies wrote:
> I am trying to compile an application that uses pthread.h and libpthread.a
> and I need to know where to find "posix" compatible pthreads?. I only see
> dce compatible pthread.h in /usr/include/dce. Unfortunately this app
> doesn't like dce pthreads.
What version of Tru64 UNIX are you using? One might infer from your use of
the term "tru64" that you're using something relatively recent, but it's
hard to be sure.
If you should chance to actually be using DEC OSF/1 3.x, then you need to
upgrade -- it didn't have POSIX threads. The standard only became final as
we were developing Digital UNIX V4.0.
If you're on V4.0x or later, then you'll find the POSIX thread header file
precisely where it must be, in /usr/include/pthread.h. (#include
<pthread.h>.) The DCE thread header files remain in /usr/include/dce/ but
you really shouldn't be using them. (Certainly not if you want POSIX
threads.)
V4.0x, however, lacked a supported libpthread.a. You should be using the
shared library, /usr/shlib/libpthread.so. If you really needed, for one or
another bizarre reason, to use a static archive, then you can install an
optional development kit (I don't remember the name and won't bother to
look it up right now), but beware that it won't continue to work on newer
versions or necessarily even patch kits.
This changed, due to popular demand, with the release of Tru64 UNIX V5.0,
which does have a supported libpthread.a on the standard kit. You still
shoudln't use it, though. The shared library is better. With it you get
full development support (the debugger and other tools like Visual Threads
can't fully support threaded programs built against the static archive).
Also, despite the requirement for continued binary compatibility with old
static images, the private kernel interfaces used by the thread library do
change now and then, and you'll lose efficiency (and sometimes the full
effect of bug fixes) if you're using an old static.
/------------------[ David.Butenhof@compaq.com ]------------------\
| Compaq Computer Corporation POSIX Thread Architect |
| My book: http://www.awl.com/cseng/titles/0-201-63392-2/ |
\-----[ http://home.earthlink.net/~anneart/family/dave.html ]-----/
prev parent reply other threads:[~2002-03-11 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-09 0:46 pthreads for tru64 4Front Technologies
2002-03-09 11:00 ` Martin Heller
2002-03-11 12:29 ` David Butenhof [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox