01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ES:DI<br />

Pointer to a 12 byte message to be sent<br />

Return Value<br />

Comments<br />

DX = 0 success AX: 0<br />

DX != 0 failure AX: contains error code<br />

If one or more tasks are waiting at the exchange for a message, the message will be immediately given<br />

to the task waiting at the head of the exchange's wait queue. This will result in an immediate task switch<br />

if the task receiving the message is higher priority than the task that is sending the message.<br />

The format of the 12 byte message being sent is defined by the application program. These 12 bytes<br />

can contain a pointer to further data, if required. This API copies these 12 bytes into an internal<br />

message envelope, so the message at [ES:DI] need not persist beyond the call to this API. (However,<br />

any data referenced by pointers contained in the message would, of course, need to be maintained until<br />

the message is received by some task.)<br />

The message mailbox priority in CX is applicable for cases where messages are accumulating on the<br />

exchange for which there are no immediate waiting message consumer tasks. In this case, a message<br />

from the highest priority non-empty mailbox FIFO queue will be given to the next caller of either<br />

RTX_GET_MSG or RTX_WAIT_MSG.<br />

Related Topics<br />

Top of list<br />

Index page<br />

<strong>RTOS</strong> Message Exchange Manager<br />

Interrupt 0xAD service 0x53: RTX_GET_MSG, Poll Message Exchange<br />

Parameters<br />

AH<br />

BX<br />

ES:DI<br />

Get an available message from a specified Message Exchange without waiting.<br />

0x53 (= RTX_GET_MSG)<br />

Message Exchange ID acquired by RTX_CREATE_MSG call.<br />

Output Parameter: Pointer to a 12 byte user buffer for storing the message (if any).<br />

Return Value<br />

Comments<br />

DX = 0 success AX: 0, Location at [ES:DI] holds the message<br />

DX != 0 failure AX: contains error code, invalid ID or -28: no message available<br />

Page 215 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!