NAME | FEATURE SUMMARY | BASIC CONCEPTS | API | ATTRIBUTES
The MIPC optional feature is designed to allow an application composed of one or multiple actors to create a shared communication environment (or message space) within which these actors can exchange messages in a very efficient way. In particular, supervisor and user actors of the same application can exchange messages using the MIPC service. Furthermore, these messages can be initially allocated and sent by interrupt handlers in order to be processed later in the context of threads.
The MIPC service is designed around the concept of message space which encapsulates, within a single entity, both a set of message pools shared by all actors of the application, and a set of message queues through which these actors exchange messages allocated from the shared message pools.
Each message pool is defined by a pair (message size, number of messages) provided by the application when it creates the message space. The configuration of the set of message pools depends on the communication needs of the application. From the application point of view, message pool requirements depend on the size range of the messages exchanged by the application, and the distribution of messages within the size range.
A message space is a temporary resource which must be explicitly created by the application. Once created, a message space may be opened by other actors of the application. A message space is bound to the actor which creates it and is automatically deleted when its creating actor and all actors which opened it have been deleted.
When an actor opens a message space, the system first assigns a private identifier to the message space. This identifier is returned to the calling actor and is used to designate the message space in all functions of the interface. The shared message pools are then mapped in the address space of the actor, at an address chosen automatically by the system.
A message is simply an array of bytes which can be structured and manipulated at application level through any appropriate convention. Messages are presented to actors as pointers within their addressing spaces.
Messages are posted to message queues. Within a message space, a queue is designated by an unsigned integer which corresponds to its index in the set of queues. Messages can also have priorities.
All resources of a message space are shared without any restriction by all actors of the application which open it. Any of these actors can allocate messages from the shared message pools. In the same way, all actors have both send and receive rights on each queue of the message space.
Most applications only need to create a single message space. However, the MIPC service is designed to allow an application to create or open multiple message spaces. Within these types of applications, messages cannot be directly exchanged across different message spaces. In other words, a message allocated from [a message pool of] one message space cannot be sent to a queue of another message space.
The MIPC API is summarized in the following table:
Comment
Allocate a message.
Free a message.
Get a message.
Post a message.
Remove a message from a queue.
Create a message space.
Open a message space.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | FEATURE SUMMARY | BASIC CONCEPTS | API | ATTRIBUTES