Sorry .. posted a related thread last week, but am still struggling to resolve it, so trying to phrase the problem differently in the desperation that someone can help.
I have 2 tasks written in Fortran ... one defines a Fortran Common block, the other needs to access it.
The question is: How does one share a Common block across 2 tasks?
Tests to date indicate that if I try to access the elements of a Common Block, defined in Task 1, within code in Task 2, I get segmentation violations. (Seems reasonable if one stops to think ... it would be very undesirable if a task can modify/destroy the memory in another task!)
However, this is what is required here ...!
I wonder if I can create a Shared Memory block to hold the Common Block in - however, I have no idea how I can force the address of a Common Block into shared memory. (The call shmat certainly fails if I specify the address of the common block).
Can anyone help please.
Note: I am currently attempting to develop solution under CygWin, but ultimately intend to use SUSE 10.2