What does generally happen in such a scenario? FWIW I'm using Nucleus.
Suppose there are two Task in our System A & B. A has a higher priority than B and both are preemptable.
A is waiting for an Event while B is executing in function() { while (1) { /* Do Something */ } }
- Can A preempt B in middle of a function call? If it can ...
- When A gets the event, B moves to suspended state or ready queue?
- If it is moved to suspended state then how does it start to execute once A is has suspended
- If it is moved to ready queue, then it's state is READY? So it means that tasks can go from RUNNING to READY in Nucleus?
Thanks