Skip to content

Commit

Permalink
cpu/cortexm_common: use irq_disable/irq_restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Dupont committed Oct 6, 2017
1 parent 2170f47 commit dd49f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu/cortexm_common/include/cpu.h
Expand Up @@ -96,10 +96,10 @@ static inline void cortexm_sleep(int deep)
}

/* ensure that all memory accesses have completed and trigger sleeping */
__disable_irq();
unsigned state = irq_disable();
__DSB();
__WFI();
__enable_irq();
irq_restore(state);
}

/**
Expand Down

0 comments on commit dd49f22

Please sign in to comment.