aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/trace_irq.h
blob: b717b1d553966f10d82c1915102929636adf92d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _LITMUS_TRACE_IRQ_H_
#define	_LITMUS_TRACE_IRQ_H_

#ifdef CONFIG_SCHED_OVERHEAD_TRACE

#include <linux/percpu.h>

extern DEFINE_PER_CPU(atomic_t, irq_fired_count);

static inline void ft_irq_fired(void)
{
	/* Only called with preemptions disabled.  */
	atomic_inc(&__get_cpu_var(irq_fired_count));
}


#else

#define ft_irq_fired() /* nothing to do */

#endif

#endif