portyield_from_isr() during a vtasksuspendall().

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 portyieldfrom_isr in the ISR . My question is : what happens if a portyieldfrom _isr() is called during the time when the scheduler has been disabled by the vtasksuspendall() call.

portyield_from_isr() during a vtasksuspendall().

There is code in the portyieldfrom_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.

portyield_from_isr() during a vtasksuspendall().

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.