interrupt: add irq_local_enable and irq_local_disable macros

Adds irq_local_enable and irq_local_disable macros to disable
and enable all IRQ sources for current core.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-08-02 14:38:39 +02:00 committed by Tomasz Lauda
parent ee194890b5
commit fe4ef2843c
1 changed files with 8 additions and 0 deletions

View File

@ -163,4 +163,12 @@ static inline void interrupt_global_enable(uint32_t flags)
arch_interrupt_global_enable(flags);
}
/* disables all IRQ sources on current core */
#define irq_local_disable(flags) \
(flags = interrupt_global_disable())
/* re-enables IRQ sources on current core */
#define irq_local_enable(flags) \
interrupt_global_enable(flags)
#endif /* __SOF_DRIVERS_INTERRUPT_H__ */