bcachefs-tools/include/linux/preempt.h
Justin Husted ff4d082246 Change preempt_disable() etc. to use a recursive mutex.
This is part of the userspace implementation of the kernel APIs for
bcachefs-tools. The previous implementation just provided a barrier, but
this isn't sufficient to make the associated percpu implementation safe.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00

17 lines
512 B
C

#ifndef __LINUX_PREEMPT_H
#define __LINUX_PREEMPT_H
extern void preempt_disable(void);
extern void preempt_enable(void);
#define sched_preempt_enable_no_resched() preempt_enable()
#define preempt_enable_no_resched() preempt_enable()
#define preempt_check_resched() do { } while (0)
#define preempt_disable_notrace() preempt_disable()
#define preempt_enable_no_resched_notrace() preempt_enable()
#define preempt_enable_notrace() preempt_enable()
#define preemptible() 0
#endif /* __LINUX_PREEMPT_H */