diff options
Diffstat (limited to 'include/litmus/trace_irq.h')
-rw-r--r-- | include/litmus/trace_irq.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/litmus/trace_irq.h b/include/litmus/trace_irq.h new file mode 100644 index 00000000000..b717b1d5539 --- /dev/null +++ b/include/litmus/trace_irq.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef _LITMUS_TRACE_IRQ_H_ | ||
2 | #define _LITMUS_TRACE_IRQ_H_ | ||
3 | |||
4 | #ifdef CONFIG_SCHED_OVERHEAD_TRACE | ||
5 | |||
6 | #include <linux/percpu.h> | ||
7 | |||
8 | extern DEFINE_PER_CPU(atomic_t, irq_fired_count); | ||
9 | |||
10 | static inline void ft_irq_fired(void) | ||
11 | { | ||
12 | /* Only called with preemptions disabled. */ | ||
13 | atomic_inc(&__get_cpu_var(irq_fired_count)); | ||
14 | } | ||
15 | |||
16 | |||
17 | #else | ||
18 | |||
19 | #define ft_irq_fired() /* nothing to do */ | ||
20 | |||
21 | #endif | ||
22 | |||
23 | #endif | ||