Skip to content

Commit c0dbfc3

Browse files
committed
testing/ostest: call up_idle() only in case of CONFIG_SIM_WALLTIME_SLEEP=y
Signed-off-by: Petro Karashchenko <[email protected]>
1 parent 3a0af85 commit c0dbfc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

testing/ostest/prioinherit.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <stdlib.h>
3232
#include <unistd.h>
3333

34-
#ifdef CONFIG_ARCH_SIM
34+
#ifdef CONFIG_SIM_WALLTIME_SLEEP
3535
# include <nuttx/arch.h>
3636
#endif
3737

@@ -251,7 +251,7 @@ static FAR void *highpri_thread(FAR void *parameter)
251251

252252
static inline void hog_cpu(void)
253253
{
254-
#ifdef CONFIG_ARCH_SIM
254+
#ifdef CONFIG_SIM_WALLTIME_SLEEP
255255
/* The simulator doesn't have any mechanism to do asynchronous pre-emption
256256
* (basically because it doesn't have any interrupts/asynchronous events).
257257
* The simulator does "fake" a timer interrupt in up_idle() -- the idle

testing/ostest/schedlock.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include <unistd.h>
4646
#include <stdint.h>
4747

48-
#ifdef CONFIG_ARCH_SIM
48+
#ifdef CONFIG_SIM_WALLTIME_SLEEP
4949
# include <nuttx/arch.h>
5050
#endif
5151

@@ -112,7 +112,7 @@ static FAR void *lowpri_thread(FAR void *parameter)
112112

113113
while (!g_locked)
114114
{
115-
#ifdef CONFIG_ARCH_SIM
115+
#ifdef CONFIG_SIM_WALLTIME_SLEEP
116116
/* The simulator doesn't have any mechanism to do asynchronous
117117
* pre-emption (basically because it doesn't have any
118118
* interrupts/asynchronous events). The simulator does "fake" a timer

0 commit comments

Comments
 (0)