CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
MemoryQueues.h File Reference

Ring-buffer message queues stored in shared memory, plus a static request/reply facility. More...

#include "MemoryManager.h"
#include "DataMessage.h"
Include dependency graph for MemoryQueues.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cmlabs::MessageQueueHeader
 On-segment header of a circular message queue (legacy 32-bit layout). More...
class  cmlabs::MessageQueue
 Static facade over shared-memory message queues and a request/reply matcher. More...

Namespaces

namespace  cmlabs

Functions

static THREAD_RET THREAD_FUNCTION_CALL cmlabs::QueueTest (THREAD_ARG arg)
bool cmlabs::TestMemoryCommander ()
 Self-test hook for the memory commander.

Detailed Description

Ring-buffer message queues stored in shared memory, plus a static request/reply facility.

A MessageQueue wraps a contiguous shared-memory region laid out as a MessageQueueHeader followed by a circular byte buffer of serialized DataMessages. Producers append at endPos, consumers read from startPos; cross-process signaling is done with named semaphores. The static API manages queues by numeric id or name so unrelated processes can rendezvous on the same queue.

Note
ProcessMemory.h defines its own (different, 64-bit) MessageQueueHeader used by the per-process queues; the two layouts are not interchangeable.
Warning
Shared-memory layouts; see MemoryManager.h for the ABI/rebuild warning.

Definition in file MemoryQueues.h.