Skip to content

Commit

Permalink
testing/ostest: call up_idle() only in case of CONFIG_SIM_WALLTIME_SL…
Browse files Browse the repository at this point in the history
…EEP=y

Signed-off-by: Petro Karashchenko <[email protected]>
  • Loading branch information
pkarashchenko committed Aug 7, 2023
1 parent 3a0af85 commit c0dbfc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions testing/ostest/prioinherit.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdlib.h>
#include <unistd.h>

#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
# include <nuttx/arch.h>
#endif

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions testing/ostest/schedlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include <unistd.h>
#include <stdint.h>

#ifdef CONFIG_ARCH_SIM
#ifdef CONFIG_SIM_WALLTIME_SLEEP
# include <nuttx/arch.h>
#endif

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0dbfc3

Please sign in to comment.