From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,c777e55073c7ca5b X-Google-Attributes: gidf7344,public X-Google-Thread: ffc1e,c777e55073c7ca5b X-Google-Attributes: gidffc1e,public X-Google-Thread: fce85,c777e55073c7ca5b X-Google-Attributes: gidfce85,public X-Google-Thread: fc7fa,c777e55073c7ca5b X-Google-Attributes: gidfc7fa,public From: Dave Butenhof Subject: Re: DEC Threads to POSIX threads translation layer? Date: 1997/02/05 Message-ID: <32F8DE86.3F54@zko.dec.com>#1/1 X-Deja-AN: 214672603 references: <01bc1209$12d0a300$ca61e426@DCorbit.solutionsiq.com> content-type: text/plain; charset=us-ascii organization: Digital Equipment Corporation mime-version: 1.0 newsgroups: vmsnet.vms-posix,comp.programming.threads,comp.sys.vms,comp.os.vms x-mailer: Mozilla 3.01Gold (X11; I; OSF1 X4.0 alpha) Dann Corbit wrote: > Is anyone aware of a POSIX threads emulator for ordinary DEC threads? I > would like to be able to use a single source code base, and run all > threading calls through the POSIX threads API. I also be able to run on > older DEC VAX systems that only have DEC threads. Is anyone aware of an > available solution? First, a terminology correction. "DECthreads" (not "DEC threads") is the generic name of Digital's common threading library. DECthreads is an implementation of POSIX threads. Old versions of VMS (prior to 7.0) and Digital UNIX (prior to 4.0), and all versions of ULTRIX and (currently) NT provide only "draft 4" POSIX apis (also known as "DCE threads", because it's the implementation that OSF licensed from us for DCE). New versions of OpenVMS and Digital UNIX implement true POSIX threads, with compatibility support for the draft 4 interfaces via a wrapper library. OK, now, on to the real question. Whether your code is using the CMA interface or the DCE thread interface, it would be fairly easy to write your own set of POSIX wrappers on top of them. Like Sun's UI threads, the semantics are very similar to POSIX threads. (It's a little more complex with CMA threads, since you need to catch the exceptions and convert back to POSIX error codes.) > Alternatively, can POSIX threads be made to function on older installations > of VMS (before OpenVMS)? That, of course depends on what you mean, but the OpenVMS 7.0 version of DECthreads (which supports POSIX threads) absolutely will not run on earlier versions of VMS. /---[ Dave Butenhof ]-----------------------[ butenhof@zko.dec.com ]---\ | Digital Equipment Corporation 110 Spit Brook Rd ZKO2-3/Q18 | | 603.881.2218, FAX 603.881.0120 Nashua NH 03062-2698 | \-----------------[ Better Living Through Concurrency ]----------------/