tests: Fix IRQ locking in sched benchmark
Corrects an issue that was introduced when the interrupt locking/unlocking was added to the 'sched' benchmark by unlocking the interrupts before the context switch done by k_yield(), but after the call to z_unpend_first_thread(). Fixes PR #81050 Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
parent
18818c15cd
commit
aeaddd70b7
1 changed files with 1 additions and 1 deletions
|
@ -112,6 +112,7 @@ int main(void)
|
|||
key = arch_irq_lock();
|
||||
stamp(UNPENDING);
|
||||
z_unpend_first_thread(&waitq);
|
||||
arch_irq_unlock(key);
|
||||
stamp(UNPENDED_READYING);
|
||||
z_ready_thread(th);
|
||||
stamp(READIED_YIELDING);
|
||||
|
@ -124,7 +125,6 @@ int main(void)
|
|||
*/
|
||||
k_yield();
|
||||
stamp(YIELDED);
|
||||
arch_irq_unlock(key);
|
||||
|
||||
uint32_t avg, whole = stamps[4] - stamps[0];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue