portyield_from_isr() during a vtasksuspendall().

sreertos wrote on Monday, January 14, 2019:

I am wondering what would happen in the following scenario.

Task one with lower priority is running, this task has a few lines of resource access code, which i am enlosing in a tasksuspendall - taskresumeall block to prevent context switching during a small portion.Let us say an interrupt occurs during this time ( interrupts not suspended) and I do a port_yield_from_isr in the ISR .

My question is : what happens if a port_yield_from _isr() is called during the time when the scheduler has been disabled by the vtasksuspendall() call.

richard_damon wrote on Monday, January 14, 2019:

There is code in the port_yield_from_isr handler to detect that the scheduler has been suspended, and it sets a flag to say that the scheduler needs to be run as soon as the scheduler is resumed.

rtel wrote on Monday, January 14, 2019:

If the scheduler is suspended then any attempt to yield will be held
pending until such time that the scheduler is unsuspended. That is done
in software, so there is no reliance on how the hardware actually
performs the yield.