testing/ostest: call up_idle() only in case of CONFIG_SIM_WALLTIME_SLEEP=y

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-04-17 17:51:29 +03:00 committed by Xiang Xiao
parent 6acf345296
commit 3648c0cc5c
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@
#include <stdlib.h>
#include <unistd.h>
#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
# include <nuttx/arch.h>
#endif
@ -251,7 +251,7 @@ static FAR void *highpri_thread(FAR void *parameter)
static inline void hog_cpu(void)
{
#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
/* The simulator doesn't have any mechanism to do asynchronous pre-emption
* (basically because it doesn't have any interrupts/asynchronous events).
* The simulator does "fake" a timer interrupt in up_idle() -- the idle

View File

@ -45,7 +45,7 @@
#include <unistd.h>
#include <stdint.h>
#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
# include <nuttx/arch.h>
#endif
@ -112,7 +112,7 @@ static FAR void *lowpri_thread(FAR void *parameter)
while (!g_locked)
{
#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
/* The simulator doesn't have any mechanism to do asynchronous
* pre-emption (basically because it doesn't have any
* interrupts/asynchronous events). The simulator does "fake" a timer