Message Queues
6-20
If no parameter structure is specified (that is, MSGQ_NOTRANSPORT is
used) in the MSGQ_TransportObj, the transport uses its default parameters.
The following is an example MSGQ configuration for a single-processor
application.
#define NUMMSGQUEUES 4 /* # of local message queues*/
#define NUMPROCESSORS 1 /* Single processor system */
static MSGQ_Obj msgQueues[NUMMSGQUEUES];
static MSGQ_TransportObj transports[NUMPROCESSOR] =
{MSGQ_NOTRANSPORT};
MSGQ_Config MSGQ_config = {
msgQueues,
transports,
NUMMSGQUEUES,
NUMPROCESSORS,
0,
MSGQ_INVALIDMSGQ,
POOL_INVALIDID
};
6.5.3 Allocators
All messages sent via the MSGQ module must be allocated by an allocator.
The allocator determines where and how the memory for the message is
allocated.
An allocator is an instance of an implementation of the allocator interface. An
application may instantiate one or more instances of an allocator.
The POOL module describes standard interface functions that allocators
must provide. The allocator interface functions are called internally by the
MSGQ module and not by user applications. A simple static allocator called
STATICPOOL is provided with DSP/BIOS, but other allocators can be
implemented by following the standard interface.
info Ptr State information needed by the transport. This field is initialized
and managed by the transport. Refer to the specific transport imple-
mentation to determine how to use this field
procId Uint16 Numeric ID of the processor that this transport communicates with.
The current processor must have a procId field that matches the
GBL.PROCID property.
Field Type Description