| .0> Why does the older UNIX have a "higher" posix number?
1003.4a and 1003.1c are not version numbers (I think the pthread(3) man page
makes this clear); their relative values don't hold any particular meaning.
1003.4 is the designation for the IEEE POSIX Realtime Working Group. 1003.4a
was the designation for a subset of the group which worked on the threads
standard. Drafts of this standard were known as 1003.4a/Dx (where "x" is the
draft number), with Draft 4 being the one which DECthreads first implemented.
(We submitted this code to the Open Software Foundation, and it became sort of a
de facto standard...sadly.) Somewhere around draft 10, the designation of the
threads effort was changed to 1003.1c, since the eventual standard would be
published as a modified version of 1003.1, which is the base operating system
specification (named after the working group which produced it).
Now that the standard is final, and we've released our implementation of the
final interface, we're in the process of revoking support for the old draft 4
interface. However, on V4.0 it is still available. If you were compiling using
the cc driver, you would specify "-threads" to get it. (To compile/link against
the standard interface you'd specify "-pthread".) I'm not sure exactly what
magic to recommend to you since you're using C++. At a minimum you need to
define the symbols "_REENTRANT" and "PTHREAD_USE_D4" for your compilation, and
you need to include the following in your link, "-lpthreads -lpthread -lmach
-lexc", but it would be better if you used a special compiler switch if there is
one.
.0> The following trivial code example compiles if pthread.h is used
.0> in place of pthread_exc.h.
That's only because it's trivial (i.e., because you're lucky -- e.g., you're not
checking any status returns, something which is done differently in the two
interfaces...).
As I indicated, the support for 1003.4a/D4 is going away, so your customer would
be well advised to migrate his code to the final standard interface.
Webb
|
| As Webb recommended, use -threads.
This option is also available for C++.
Specify it in the compile and link command, if you have to use the old style
POSIX 1003.4a/D4. It includes all the necessary defines and library
specifications you need for 1003.4a/D4.
Nevertheless try to use new POSIX 1003.1c if you can modify the existing code.
Helmut
|