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:
parent
6acf345296
commit
3648c0cc5c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user