diff options
Diffstat (limited to 'tools/testing/shared/linux/preempt.h')
-rw-r--r-- | tools/testing/shared/linux/preempt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/shared/linux/preempt.h b/tools/testing/shared/linux/preempt.h new file mode 100644 index 000000000000..edb10302b903 --- /dev/null +++ b/tools/testing/shared/linux/preempt.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_PREEMPT_H +#define __LINUX_PREEMPT_H + +extern int preempt_count; + +#define preempt_disable() uatomic_inc(&preempt_count) +#define preempt_enable() uatomic_dec(&preempt_count) + +static inline int in_interrupt(void) +{ + return 0; +} + +#endif /* __LINUX_PREEMPT_H */ |