Exchanging state between two (soft-)realtime processes
meyer at mesw.de
Sat Jan 7 00:22:48 CET 2006
Paolo Mantegazza schrieb:
> - first init a mailbox with exactly the same size of a single of your
> - write to it with: int rt_mbx_ovrwr_send(MBX *mbx, void *msg, int
> msg_size); it will ovewrite whatever content is in the mailbox so,
> since it is exactly of the same size as your message only the very
> last one will be kept;
> - do not read the maibox with mbx_receive but just spy (eavesdrop) its
> content using: int rt_mbx_evdrp(MBX *mbx, void *msg, int msg_size);
> with it the message can be read by anybody, many times, while being
> keept unchanged, till a new overwrite occurs.
thanks for the clear explanation. This sounds exactly like what I need.
Can I be sure that the overwrite of the old message will be atomic, so
the "spying" thread will never see an inconsistent state?
More information about the Rtai