[Info-vax] pthread_kill() replacement for VMS?

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Thu Jul 27 11:16:29 EDT 2017


On 2017-07-27 13:20:50 +0000, John Reagan said:

> Ah, pthread_kill.  The "standard" way to write non-portable code.

Also known as a case where OpenVMS diverges from defacto implementation 
standards.

> It is mixing both threads and signals together.  Signals are an 
> emulation of the CRTL, not really part of the OS.

That's been slowly and incrementally changing, though.   q.v.  the 
sys$ssio* calls, and the sys$sigprc call, probably among others.

I see that $sigprc isn't in STARLET.SDL, but is still in 
SYS$PUBLIC_VECTORS.EXE.  But I digress.

> In some cases, you can turn the pthread_kill into 
> pthread_cancel/pthread_testcancel.
> 
> Here's the stock answer from the threads notefile when pthread_kill has 
> been asked for over the years (in particular, from others who ported 
> the gnulib going as far back as the early 2000s)
> 
> "The foremost is that UNIX signals are emulated on OpenVMS, and that 
> emulation is provided by the C RTL, not by the base OS.

Ayup.    But then I'm also on record supporting the retirement of the 
current C RTL design and implementation (including CMA/pthreads, and 
the separate sockets giblets.   Of  replacing it with a new C RTL, and 
preferably one with additions such as a ubiquitous and system-wide 
preferences-file implementation, and with integration into the image 
activator to avoid those blasted DECC$ logical names, and related.   Of 
the addition of both SSIO and  the most common missing C calls, too.  
With VSIC$ or some such.   Basically, of replacing the current design 
with one that better matches C11 and POSIX and with better BSD and 
Linux compatibility.



-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list