Tool/software: TI-RTOS
Hi,
I would like to know about mailbox behavior in TI-RTOS multi threaded application.
Consider application has tasks and ISRs as below:
Note: Higher the number, higher the priority.
T1 // Priority 1
{
Mailbox_pend(mbox_handle, buffer, BIOS_WAIT_FOREVER);
}
T2 // Priority 2
{
Mailbox_post(mbox_handle, buffer, BIOS_WAIT_FOREVER);
}
T3 // Priority 3
{
Mailbox_post(mbox_handle, buffer, BIOS_WAIT_FOREVER);
}
ISR1 // Priority highest among all tasks
{
Mailbox_post(mbox_handle, buffer, BIOS_WAIT_FOREVER);
}
ISR2 // Priority highest among all tasks
{
Mailbox_post(mbox_handle, buffer, BIOS_NO_WAIT);
}
Case 1: Suppose if T2 is running and Mailbox_post() is executing.
What will happen if T3 is scheduled to run ? T3 will be in execution or T2 continue Mailbox_post() or anything else ?
Case 2: Suppose if T2 is running and Mailbox_post() is executing.
What will happen if ISR1 is scheduled to run because of hardware interrupt ? ISR1 will be in execution or T2 continue Mailbox_post() or anything else ?
Case 3: Suppose if T2 is running and Mailbox_post() is executing.
What will happen if ISR2 is scheduled to run because of hardware interrupt ? ISR2 will be in execution or T2 continue Mailbox_post() or anything else ?
What will be behavior in above cases ?