8 /* This flag contains garbage if preempt_disable_count is 0. */
9 extern __thread int thread_cpu_id;
11 /* Support recursive preemption disabling. */
12 extern __thread int preempt_disable_count;
14 void preempt_disable(void);
15 void preempt_enable(void);
17 static inline void preempt_disable_notrace(void)
22 static inline void preempt_enable_no_resched(void)
27 static inline void preempt_enable_notrace(void)
32 static inline int preempt_count(void)
34 return preempt_disable_count;
37 static inline bool preemptible(void)
39 return !preempt_count();
42 static inline int get_cpu(void)
48 static inline void put_cpu(void)
53 static inline void might_sleep(void)
55 BUG_ON(preempt_disable_count);