Chapter 19

Intertask Communication

Message Queue

Abstract

A POSIX message queue is a mechanism for asynchronous interprocess communication. Multiple tasks can send messages to a message queue; a sending task can be blocked when the target message queue is full. A message queue can also have multiple tasks receiving messages from it; a receiving task can be blocked when the queue is empty. A message queue allows nonblocking access when it is so configured. A POSIX message queue also features a notification mechanism that allows a process to register itself to a message queue and be asynchronously notified when the queue transitions from empty to nonempty. Message queues can be used to implement one-way, two-way, and client-server communications. ...

Get Real-Time Embedded Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.