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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Comments<br />

typedef struct tag_rtx_wait_msg{<br />

unsigned int msgID; // ID of the message exchange<br />

unsigned int prio; // Priority for wait [0 .. 0xFFFF], 0 = highest<br />

char far *msg; // Pointer to user buffer to store the arrived message<br />

long timeout; // Maximum time (milliseconds) for waiting for a message<br />

} RTX_Wait_Msg;<br />

This structure is defined in the header file rtxapi.h.<br />

Prior to calling the RTX_WAIT_MSG ALI, the caller must set the following members of the RTX_Wait_Msg structure.<br />

msgID<br />

Here you put the message exchange ID acquired by the RTX_CREATE_MSGcall.<br />

prio<br />

msg<br />

Specify here the priority of the calling task's access to the messages. To wait in FIFO order, have all<br />

RTX_WAIT_MSGAPI callers use the same value here. A task can cut in line ahead of other waiting tasks by<br />

setting this field to a higher priority (lower number) than used by the other tasks. (Note that this priority has no<br />

connection to either taskpriority or Message send mailboxpriority.)<br />

Put here a far pointer to a 12 byte buffer allocated in your application program memory. The Message<br />

Exchange Manager will copy the message to this buffer if a message is available.<br />

timeout<br />

Here you can specify the maximum number of milliseconds you are willing to wait for a message. A value of<br />

zero indicates you will wait forever. Negative values are not permitted.<br />

Related Topics<br />

Top of list<br />

Index page<br />

API function RTX_WAIT_MSG - Wait for a message from a message exchange<br />

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

TaskDefBlock<br />

Comments<br />

typedef struct tag_taskdefblock<br />

{<br />

void (far *proc)(); // Task entry vector (far)<br />

char name[4]; // Task name, 4 characters not null terminated<br />

unsigned int far *stackptr; // Task stack pointer (far)<br />

unsigned int stacksize; // size of stack (bytes)<br />

unsigned short attrib; // task attributes (not supported by the <strong>RTOS</strong> API)<br />

short int priority; // task priority, range: 3..127 inclusive<br />

unsigned short time_slice; // 0: none, !=0: number of milliseconds before task<br />

// is forced to relinquish processor<br />

short mailboxlevel1; // not used<br />

short mailboxlevel2; // not used<br />

short mailboxlevel3; // not used<br />

short mailboxlevel4; // not used<br />

} TaskDefBlock;<br />

This structure is defined in the header file rtxapi.h.<br />

Page 238 / 400

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

Saved successfully!

Ooh no, something went wrong!