sdj_work
asked on
#pragma data_seg("shared") and threads?
In 16-bit land data in a dll could be shared. In 32-bit land the data can still be shared but must be declared in a #pragma data_seg compiler directive.
If I do this is there a new problem of the data being accessed across different thread boundaries? In which case do I have to place a critical section around access to all the shared data?
If I do this is there a new problem of the data being accessed across different thread boundaries? In which case do I have to place a critical section around access to all the shared data?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is from Q100634:
"if the block cannot be loaded into the same memory address, it is mapped to a different address, but it is still shared.".
So I guess I'm wrong about data not beeing shared when dll's are relocated, but I would still use the memmory mapped file method.
"if the block cannot be loaded into the same memory address, it is mapped to a different address, but it is still shared.".
So I guess I'm wrong about data not beeing shared when dll's are relocated, but I would still use the memmory mapped file method.
ASKER
Otherwise there would be no point in implementing the feature.