I am sharing some memory (created with shm_open
where I map different "regions" with mmap
) across multiple processes. I am using named semaphores to synchronize accesses to that memory.
I have a region in that memory that is read-only (it has been set by the process that creates the shared memory object). Do I still need to use mutexes to let the processes read that region? If that region can be read concurrently I can drop named semaphores and share unnamed semaphores instead.
The question is similar to what asked here but maybe the OP was not clear enough.