aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-15 15:51:54 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-12-27 11:50:20 -0500
commit1e2f2d31997a9496f99e2b43255d6a48b06fbcc2 (patch)
treeb2477645a8943813f1b934405e8238a76814d3b0 /include/linux/sched.h
parentkill unnecessary thread_info.h include (diff)
downloadwireguard-linux-1e2f2d31997a9496f99e2b43255d6a48b06fbcc2.tar.xz
wireguard-linux-1e2f2d31997a9496f99e2b43255d6a48b06fbcc2.zip
Kill sched.h dependency on rcupdate.h
by moving cond_resched_rcu() to rcupdate_wait.h, we can kill another big sched.h dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a588b94988bc..814bfdafbc1c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -10,9 +10,14 @@
#include <uapi/linux/sched.h>
#include <asm/current.h>
+#include <asm/processor.h>
+#include <linux/thread_info.h>
+#include <linux/preempt.h>
+#include <linux/cpumask.h>
#include <linux/cache.h>
#include <linux/irqflags_types.h>
+#include <linux/smp_types.h>
#include <linux/pid_types.h>
#include <linux/sem_types.h>
#include <linux/shm.h>
@@ -23,7 +28,6 @@
#include <linux/timer_types.h>
#include <linux/seccomp_types.h>
#include <linux/nodemask_types.h>
-#include <linux/rcupdate.h>
#include <linux/refcount_types.h>
#include <linux/resource.h>
#include <linux/latencytop.h>
@@ -2059,15 +2063,6 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock);
__cond_resched_rwlock_write(lock); \
})
-static inline void cond_resched_rcu(void)
-{
-#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU)
- rcu_read_unlock();
- cond_resched();
- rcu_read_lock();
-#endif
-}
-
#ifdef CONFIG_PREEMPT_DYNAMIC
extern bool preempt_model_none(void);