From ba73272f67f6ac99b30b26f8f08f54f245c3c3a2 Mon Sep 17 00:00:00 2001 From: cuiziwei Date: Thu, 24 Aug 2023 17:12:13 +0800 Subject: [PATCH] nuttx/sim:add up_irq_enbale function. Signed-off-by: cuiziwei --- arch/sim/include/irq.h | 1 + arch/sim/src/sim/posix/sim_hostirq.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index 93397018d6..05942e5232 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -118,6 +118,7 @@ int up_cpu_index(void); irqstate_t up_irq_flags(void); irqstate_t up_irq_save(void); void up_irq_restore(irqstate_t flags); +void up_irq_enable(void); /**************************************************************************** * Inline functions diff --git a/arch/sim/src/sim/posix/sim_hostirq.c b/arch/sim/src/sim/posix/sim_hostirq.c index 8b6086c3cd..4bcc050859 100644 --- a/arch/sim/src/sim/posix/sim_hostirq.c +++ b/arch/sim/src/sim/posix/sim_hostirq.c @@ -118,6 +118,19 @@ void up_irq_restore(uint64_t flags) pthread_sigmask(SIG_SETMASK, &nmask.sigset, NULL); } +/**************************************************************************** + * Name: up_irq_enable + * + * Description: + * Enable interrupts. + * + ****************************************************************************/ + +void up_irq_enable(void) +{ + up_irq_restore(0); +} + /**************************************************************************** * Name: up_irqinitialize ****************************************************************************/