|
Read/write locks within and between processes. Can you help?
I have an application that is multithreaded and concurrent. Multiple instances of the application must run at the same time.
Each thread in each process accesses shared resources. For this purpose I've employed Butenhof's read-write locks. Inter-process locking is based on fcntl. For example, fcntl is used to prevent a reader from process 1 getting access to a resource that was write locked by a thread from process 2.
I am not sure that this implementation is watertight. Do you know of a "standard" implementation for this kind of mutex? Do you know of another way to implement this kind of locking?
Cheers,
Adam
|