Skip to content

Commit 8fd8ca3

Browse files
committed
rcu-tasks: Move #ifdef into tasks.h
This commit pushes the #ifdef CONFIG_TASKS_RCU_GENERIC from kernel/rcu/update.c to kernel/rcu/tasks.h in order to improve readability as more APIs are added. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 4593e77 commit 8fd8ca3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

kernel/rcu/tasks.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Copyright (C) 2020 Paul E. McKenney
66
*/
77

8+
#ifdef CONFIG_TASKS_RCU_GENERIC
89

910
////////////////////////////////////////////////////////////////////////
1011
//
@@ -984,3 +985,7 @@ core_initcall(rcu_spawn_tasks_trace_kthread);
984985
#else /* #ifdef CONFIG_TASKS_TRACE_RCU */
985986
void exit_tasks_rcu_finish_trace(struct task_struct *t) { }
986987
#endif /* #else #ifdef CONFIG_TASKS_TRACE_RCU */
988+
989+
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
990+
static inline void rcu_tasks_bootup_oddness(void) {}
991+
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */

kernel/rcu/update.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,7 @@ late_initcall(rcu_verify_early_boot_tests);
584584
void rcu_early_boot_tests(void) {}
585585
#endif /* CONFIG_PROVE_RCU */
586586

587-
#ifdef CONFIG_TASKS_RCU_GENERIC
588587
#include "tasks.h"
589-
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
590-
static inline void rcu_tasks_bootup_oddness(void) {}
591-
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
592588

593589
#ifndef CONFIG_TINY_RCU
594590

0 commit comments

Comments
 (0)