Skip to content

Commit

Permalink
nuttx/sim:add up_irq_enbale function.
Browse files Browse the repository at this point in the history
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
  • Loading branch information
cuiziweizw authored and pkarashchenko committed Sep 6, 2023
1 parent b750f94 commit ba73272
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/sim/include/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions arch/sim/src/sim/posix/sim_hostirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
****************************************************************************/
Expand Down

0 comments on commit ba73272

Please sign in to comment.