IXP1200 Network Processor Family ATM
4.6.1MSGQ_HANDLE Parameters
The following parameters make up MSGQ_HANDLE and are common to all macros in msgq.uc:
Parameter | Description | |
|
| |
| GPR storing the current index into the queue. An absolute register is used to share the | |
io_index | index between threads. However, if the threads don’t share access to the queue, a relative | |
| GPR can be used. | |
|
| |
in_base_addr | GPR storing the base address of the queue in RAM_TYPE (scratchpad or SRAM). An | |
absolute GPR is used when the queue is shared between threads. | ||
| ||
|
| |
in_const_one | The value one in a GPR, typically absolute, or the constant 1. The register is generally | |
used to save cycles. | ||
| ||
|
| |
BASE_ADDR | Base address of the queue in RAM_TYPE | |
|
| |
| Synchronization type, as follows: | |
| #define MSGQ_ASYNC 0 - return immediately, with or without data | |
SYNC_TYPE | #define MSGQ_SYNC_POLL 1 - wait for data | |
| #define MSGQ_SYNC_SLEEP 2 - wait for data | |
| to wake up receiver | |
|
| |
RAM_TYPE | RAM type. Typically scratchpad, can also be SRAM. | |
|
| |
MSGQ_SIZE | Number of longwords in the message queue. Must be a power of 2. 16 is typically used for | |
scratchpad queues because it saves instructions. | ||
| ||
|
|
4.6.2msgq_init_queue()
Initializes the global queue in RAM_TYPE. Called by central initialization code before queues are accessed.
msgq_init_queue(MSGQ_HANDLE)
Parameter | Description |
|
|
MSGQ_HANDLE | Parameters described in “MSGQ_HANDLE Parameters”. |
|
|
4.6.3msgq_init_regs()
Initializes the registers used to access the queue. Called by both producer and consumer.
msgq_init_regs(MSGQ_HANDLE)
Parameter | Description |
|
|
MSGQ_HANDLE | Parameters described in “MSGQ_HANDLE Parameters”. |
|
|
4.6.4msgq_send()
Sends a message to the queue.
Application Note | 43 |
Modified on: 3/20/02,