jcs's openbsd hax
openbsd
1/* Public domain. */
2
3#ifndef _LINUX_PREEMPT_H
4#define _LINUX_PREEMPT_H
5
6#include <asm/preempt.h>
7#include <sys/param.h> /* for curcpu in machine/cpu.h */
8
9static inline void
10preempt_enable(void)
11{
12}
13
14static inline void
15preempt_disable(void)
16{
17}
18
19static inline void
20migrate_enable(void)
21{
22}
23
24static inline void
25migrate_disable(void)
26{
27}
28
29static inline bool
30in_irq(void)
31{
32 return (curcpu()->ci_idepth > 0);
33}
34
35static inline bool
36in_interrupt(void)
37{
38 return in_irq();
39}
40
41static inline bool
42in_task(void)
43{
44 return !in_irq();
45}
46
47static inline bool
48in_atomic(void)
49{
50 return false;
51}
52
53#endif