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

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Thu Jul 27 11:46:15 EDT 2017


On 2017-07-27 15:25:40 +0000, Scott Dorsey said:

> Stephen Hoffman  <seaohveh at hoffmanlabs.invalid> wrote:
>> On 2017-07-27 14:04:30 +0000, Scott Dorsey said:
>> 
>>> On Thursday, July 27, 2017 at 8:59:52 AM UTC-4, John E. Malmberg wrote:
>>>> 
>>>> One of the gnulib tests is doing a pthread_kill call which does not
>>>> exist on VMS.
>>> 
>>> Good.
>>> 
>>>> Is there a quick fix to create such a routine?
>>> 
>>> No.  Any time you see code using such a thing, it is inherently unsafe.
>> 
>> The pthread_kill call is part of the POSIX.1 IEEE Std 1003.1-2008 standard:
>> 
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_kill.html
> 
> It certainly is, but that doesn't make it a good idea.

have So two problems now they?

There's been some debate about implementing threads correctly, and also 
implementing threads as a library, too.

http://www.hpl.hp.com/techreports/2009/HPL-2009-259.html
http://www.hpl.hp.com/techreports/2004/HPL-2004-209.html

C11 and C++11 are rather better here...

https://stackoverflow.com/questions/8876043/multi-threading-support-in-c11#8877562 

http://www.hboehm.info/c++mm/

I personally find that libdispatch/GCD and blocks and the C11 bits are 
preferable to the POSIX threading approach, or KP Threads if I'm 
strictly using OpenVMS, but then there are apps and folks that can and 
will need the POSIX threading giblets, and other POSIX-related C calls. 
 Including the pthread_kill call.

In terms of implementations, OpenVMS doc has had some documentation 
gaps around properly mixing threads and ASTs in user code.   And 
OpenVMS needs better POSIX and gcc/clang-compatible support in general.



-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list