blob: c0d8bf6b95d6b518355c27be6674190118220faa (
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
|
/* Public domain. */
#ifndef _LINUX_PREEMPT_H
#define _LINUX_PREEMPT_H
#define preempt_enable()
#define preempt_disable()
static inline bool
in_irq(void)
{
#if defined(__amd64__) || defined(__arm__) || defined(__arm64__) || \
defined(__i386__)
return (curcpu()->ci_idepth > 0);
#else
return false;
#endif
}
#define in_interrupt() in_irq()
#define in_task() (!in_irq())
#endif
|