Other Parts Discussed in Thread: SYSBIOS
Hi,
I am currently using TI-RTOS 2.11.01.09 with Sysbios 6.41.02.41.
It is not clear to me how the events are managed if two messages are queued in the mailbox before the task can process them. I tried looking at the source code, but I don't references to events in the file mailbox.c.
Here is a snippet of code (don't mind the typos):
while (1)
{
// Wait for a new event
UInt events = Event_pend(mNetworkEvent, QUEUE_EVENT_NONE, (QUEUE_EVENT_COMMAND | QUEUE_EVENT_MESSAGE), BIOS_WAIT_FOREVER);
if (event & QUEUE_EVENT_COMMAND)
{
Mailbox_pend(mCommandQueue, &command, BIOS_NO_WAIT);
// do stuff here
}
if (event & QUEUE_EVENT_MESSAGE)
{
Mailbox_pend(mCommandQueue, &message, BIOS_NO_WAIT);
//do other stuff here
}
}
So what happens to events if I have two messages waiting in one of those mailboxes and I read only once as illustrated in the code above?
Will the event be triggered only once for both events or will the event be "re-triggered" a second time after I dequeue the first message?
Thank you