Hi, a hopefully simple example to explain the background of my question.
Say, an interrupt handler is interrupting a thread "some_thread_id_A" and looks as follows:
SomeIRQHandler(void)
{
... some code that handles the source of the event
// trigger an event for an RTX-operated thread
osSignalSet(some_thread_id_B, SOME_EVENT);
}
Now, let's further assume that the thread "some_thread_id_B"
- is suspended on SOME_EVENT before the above interrupt happens.
- is the highest prio thread in the application code
After the above interrupt, the event has obviously happened and some_thread_id_B would no longer be suspended.
Now, here's the question:
When does RTX evaluate the thread priorities and the events? When does it figure out that some_thread_id_B is now ready to run? Right after the interrupt handler returns? Or at the time tick?
To be even more specific: Will SomeIRQHandler() return to thread "some_thread_id_A" (no longer being the highest prio ready-to-run thread after the event) or will it return to thread "some_thread_id_b"?
I'm running RTX on a Cortex M0.
Thx
P.S: You might remember that this question has been asked by me in the old ARM discussions Forums, but I asked this Forum's admins, they told me that it has not been migrated and that I should ask the question again.
Does this also apply if I use a peripheral timer (e.g. RITIMER) as the system tick timer for RTX?
Thanks,
Chiong