PTHREAD_MUTEX_SHARED on Cygwin

Thomas Koenig tkoenig@netcologne.de
Sat Jan 9 18:23:39 GMT 2021


Hi,

there is a branch of gfortran for implementing coarrays based on a
shared memory implementation instead of MPI, the devel_coarray/native
branch.

I tried it out on Cygwin, but it doesn't work there (hangs on the
first sync).

The branch uses pthread mutexes and condition variables
with PTHREAD_PROCESS_SHARED for synchronization between processes.

I also ran the attached test program, which gave the output

pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)failed: No error


Is it correct that PTHREAD_PROCESS_SHARED is not supported on
Cygwin?  Is it supported for condition variables, or is the fact
that it is reported as working an oversight?

If PTHREAD_PROCESS_SHARED does not work, are there known workarounds?

Best regards

	Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s.c
Type: text/x-csrc
Size: 971 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20210109/0e02a142/attachment.bin>


More information about the Cygwin mailing list