lynxos

How do I synchronize access to shared memory in LynxOS/POSIX?

不打扰是莪最后的温柔 提交于 2019-12-28 05:31:09
问题 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,

Condition Variable in Shared Memory - is this code POSIX-conformant?

≡放荡痞女 提交于 2019-12-09 00:55:16
问题 Does the POSIX standard allow a named shared memory block to contain a mutex and condition variable? We've been trying to use a mutex and condition variable to synchronise access to named shared memory by two processes on a LynuxWorks LynxOS-SE system (POSIX-conformant). One shared memory block is called "/sync" and contains the mutex and condition variable, the other is "/data" and contains the actual data we are syncing access to. We're seeing failures from pthread_cond_signal() if both

Condition Variable in Shared Memory - is this code POSIX-conformant?

自作多情 提交于 2019-11-30 21:41:08
Does the POSIX standard allow a named shared memory block to contain a mutex and condition variable? We've been trying to use a mutex and condition variable to synchronise access to named shared memory by two processes on a LynuxWorks LynxOS-SE system (POSIX-conformant). One shared memory block is called "/sync" and contains the mutex and condition variable, the other is "/data" and contains the actual data we are syncing access to. We're seeing failures from pthread_cond_signal() if both processes don't perform the mmap() calls in exactly the same order , or if one process mmaps in some other

How do I synchronize access to shared memory in LynxOS/POSIX?

余生颓废 提交于 2019-11-27 20:16:58
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, rather than multi-threaded, architecture? Is there a LynxOS/POSIX way to create a condvar/mutex pair that