| Well, given neither Webb nor Dave are currently around to answer this
thoroughly, I'll have a got at..
Prior to V7.0, <pthread.h> defined the draft 4 of the (then) proposed
POSIX threads standard. A final standard was passed, 1003.1c, which
was implemented by DECthreads in OpenVMS V7.0. The standard mandated
that that interface be defined in <pthread.h>. Since there was (and
still is) a fair amount of existing code coded against draft 4 of the
standard, a new header <pthread_d4.h> was created for use by applications
until they could migrate their code to use the 1003.1c interface.
From the commentary in <pthread.h>:
* NOTICE: Temporary support for POSIX 1003.4a/D4 migration
* --------------------------------------------------------
*
* Support 1003.4a/D4 ("DCE threads") source migration mode by allowing
* programmer to cause #include <pthread.h> to define the old interfaces
* (with modified names) if the _PTHREAD_USE_D4 macro is defined. This is
* equivalent to #include <pthread_d4.h> -- the remainder of this header
* file is not processed.
*
* In practice, you can invoke the source migration mode either by the
* following sequence within your .c or .h files:
*
* #define _PTHREAD_USE_D4
* #include <pthread.h>
*
* or by modifying your Makefile (or manual build sequence) to use the -D
* compiler (or cpp) option:
*
* cc -D_PTHREAD_USE_D4 foo.c
*
* The POSIX 1003.4a/D4 migration support will be retired (this clause will
* be removed from pthread.h!) in the next major release of each operating
* system (OpenVMS VAX, OpenVMS Alpha, and Digital UNIX) that occurs at least
* one year after the initial release of the POSIX 1003.1c interfaces in
* Digital UNIX 4.0 and OpenVMS 7.0.
*
Hmmm.. We should probably reword the "will be retired" clause since the one
year mark has come and gone for both UNIX/VMS. But that's a discussion for
another note (1517.*). ;-)
So if your customer has an existing application coded against the D4
interface which he is trying to rebuild on OpenVMS V7.0, he can either
include <pthread_d4.h> directly, or compile his code:
$ CC/DEFINE=(_PTHREAD_USE_D4) FOO.C
If your customer is writing *new* threaded code, he shouldn't be
writing against the old standard. With the standard implementation,
he should use the routine pthread_attr_init. Does he have a copy
of the Guide to DECthreads revised for V7.n?
-Mary
|
| This is much more convenient on Digital UNIX, and essentially transparent for
old makefiles that were built according to the rules. The cc compiler
"driver" supported the "-threads" switch, which was the documented way to
build code that used the DCE thread or CMA interfaces. When we released POSIX
thread support in Digital UNIX 4.0, we added "-D_PTHREAD_USE_D4" to -threads
and created a new -pthread switch to build POSIX thread code.
Unfortunately, the VMS cc command never had any direct thread support, so
there's no way to avoid changing something.
/dave
|