Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Matthew Wilcox | ab3a1ff | 2016-12-16 15:11:05 -0500 | [diff] [blame] | 2 | #ifndef __LINUX_PREEMPT_H |
| 3 | #define __LINUX_PREEMPT_H |
| 4 | |
Matthew Wilcox | 847d357 | 2016-12-14 15:08:02 -0800 | [diff] [blame] | 5 | extern int preempt_count; |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 6 | |
Matthew Wilcox | 847d357 | 2016-12-14 15:08:02 -0800 | [diff] [blame] | 7 | #define preempt_disable() uatomic_inc(&preempt_count) |
| 8 | #define preempt_enable() uatomic_dec(&preempt_count) |
Matthew Wilcox | ab3a1ff | 2016-12-16 15:11:05 -0500 | [diff] [blame] | 9 | |
| 10 | static inline int in_interrupt(void) |
| 11 | { |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | #endif /* __LINUX_PREEMPT_H */ |