Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/sim/src/sim/posix/sim_hostsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ static void *sim_idle_trampoline(void *arg)

host_cpu_started();

sim_unlock();

/* The idle Loop */

for (; ; )
Expand Down
10 changes: 10 additions & 0 deletions arch/sim/src/sim/sim_doirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,23 @@
#include <stdbool.h>
#include <nuttx/arch.h>
#include <sched/sched.h>
#include <nuttx/init.h>

#include "sim_internal.h"

/****************************************************************************
* Public Functions
****************************************************************************/

void sim_unlock(void)
{
/* wait until cpu0 in idle() */

while (!OSINIT_IDLELOOP());

sched_unlock();
}

/****************************************************************************
* Name: sim_doirq
****************************************************************************/
Expand Down
1 change: 1 addition & 0 deletions arch/sim/src/sim/sim_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ extern char **g_argv;

void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src);
void *sim_doirq(int irq, void *regs);
void sim_unlock(void);

/* sim_hostmisc.c ***********************************************************/

Expand Down
5 changes: 1 addition & 4 deletions include/nuttx/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
SP_DMB(); \
g_cpu_irqlock = SP_UNLOCKED; \
SP_DSB(); \
SP_SEV(); \
spin_unlock_wo_note(&g_cpu_irqlock); \
} \
while (0)
#endif
Expand Down