This PR resolve issue #208, enhances the msgq with shared memory mutexes and condition variables for improved IPC synchronization. While handling signals interrupts all processes, shared memory mechanisms provide a more robust and efficient solution, reducing overhead and complexity in high-frequency event scenarios.
key changes:
Each block of shared memory used for messages now includes a header:
This header contains the IPC mutex, condition variable, and an initialization flag.
When sending a message, the corresponding condition variable is used to notify the receiver to retrieve the message.
The Poller uses a global shared memory context, PollerContext, to handle message notifications and reception efficiently.
@pd0wm If you have a moment, your review of this PR would be greatly appreciated to ensure I haven't missed anything or introduced new issues.
This PR resolve issue #208, enhances the msgq with shared memory mutexes and condition variables for improved IPC synchronization. While handling signals interrupts all processes, shared memory mechanisms provide a more robust and efficient solution, reducing overhead and complexity in high-frequency event scenarios.
key changes:
Each block of shared memory used for messages now includes a header:
This header contains the IPC mutex, condition variable, and an initialization flag.
When sending a message, the corresponding condition variable is used to notify the receiver to retrieve the message. The Poller uses a global shared memory context, PollerContext, to handle message notifications and reception efficiently.
@pd0wm If you have a moment, your review of this PR would be greatly appreciated to ensure I haven't missed anything or introduced new issues.