xref: /openbmc/linux/tools/testing/radix-tree/linux/preempt.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2ab3a1ffdSMatthew Wilcox #ifndef __LINUX_PREEMPT_H
3ab3a1ffdSMatthew Wilcox #define __LINUX_PREEMPT_H
4ab3a1ffdSMatthew Wilcox 
5847d3576SMatthew Wilcox extern int preempt_count;
61366c37eSMatthew Wilcox 
7847d3576SMatthew Wilcox #define preempt_disable()	uatomic_inc(&preempt_count)
8847d3576SMatthew Wilcox #define preempt_enable()	uatomic_dec(&preempt_count)
9ab3a1ffdSMatthew Wilcox 
in_interrupt(void)10ab3a1ffdSMatthew Wilcox static inline int in_interrupt(void)
11ab3a1ffdSMatthew Wilcox {
12ab3a1ffdSMatthew Wilcox 	return 0;
13ab3a1ffdSMatthew Wilcox }
14ab3a1ffdSMatthew Wilcox 
15ab3a1ffdSMatthew Wilcox #endif /* __LINUX_PREEMPT_H */
16