How do I synchronize access to shared memory in LynxOS/POSIX?
问题 I am implementing two processes on a LynxOS SE (POSIX conformant) system that will communicate via shared memory. One process will act as a "producer" and the other a "consumer". In a multi-threaded system my approach to this would be to use a mutex and condvar (condition variable) pair, with the consumer waiting on the condvar (with pthread_cond_wait ) and the producer signalling it (with pthread_cond_signal ) when the shared memory is updated. How do I achieve this in a multi-process,