tests: context: busy-wait with interrupts locked
This is expected to work on all platforms. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
c8a528d322
commit
b7e363661d
1 changed files with 10 additions and 0 deletions
|
@ -697,6 +697,16 @@ static void busy_wait_thread(void *mseconds, void *arg2, void *arg3)
|
||||||
k_busy_wait(usecs);
|
k_busy_wait(usecs);
|
||||||
TC_PRINT("Thread busy waiting completed\n");
|
TC_PRINT("Thread busy waiting completed\n");
|
||||||
|
|
||||||
|
/* FIXME: Broken on Nios II, see #22956 */
|
||||||
|
#ifndef CONFIG_NIOS2
|
||||||
|
int key = arch_irq_lock();
|
||||||
|
|
||||||
|
TC_PRINT("Thread busy waiting for %d usecs (irqs locked)\n", usecs);
|
||||||
|
k_busy_wait(usecs);
|
||||||
|
TC_PRINT("Thread busy waiting completed (irqs locked)\n");
|
||||||
|
arch_irq_unlock(key);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ideally the test should verify that the correct number of ticks
|
* Ideally the test should verify that the correct number of ticks
|
||||||
* have elapsed. However, when running under QEMU, the tick interrupt
|
* have elapsed. However, when running under QEMU, the tick interrupt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue