irq_arch_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef IRQ_ARCH_COMMON_H
22 #define IRQ_ARCH_COMMON_H
23 
24 #include "irq.h"
25 #include "sched.h"
26 #include "thread.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 extern volatile uint32_t irq_interrupt_nesting;
38 
47 #define irq_isr_enter()
48 #define irq_isr_exit()
49 
58 #define critical_enter() int _irq_state = irq_disable()
59 #define critical_exit() irq_restore(_irq_state)
60 
66 #define critical_enter_var(m) m = irq_disable()
67 #define critical_exit_var(m) irq_restore(m)
68 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* IRQ_ARCH_COMMON_H */
sched.h
Scheduler API definition.
irq_interrupt_nesting
volatile uint32_t irq_interrupt_nesting
Indicates the interrupt nesting depth.
irq.h
IRQ driver interface.