Skip to content

Commit 3cd7271

Browse files
author
Ingo Molnar
committed
sched/headers: Move struct pre-declarations to the beginning of the header
There's a random number of structure pre-declaration lines in kernel/sched/sched.h, some of which are unnecessary duplicates. Move them to the head & order them a bit for readability. Signed-off-by: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected]
1 parent 127f6bf commit 3cd7271

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

kernel/sched/sched.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474

7575
#include "../workqueue_internal.h"
7676

77+
struct rq;
78+
struct cfs_rq;
79+
struct rt_rq;
80+
struct sched_group;
81+
struct cpuidle_state;
82+
7783
#ifdef CONFIG_PARAVIRT
7884
# include <asm/paravirt.h>
7985
# include <asm/paravirt_api_clock.h>
@@ -90,9 +96,6 @@
9096
# define SCHED_WARN_ON(x) ({ (void)(x), 0; })
9197
#endif
9298

93-
struct rq;
94-
struct cpuidle_state;
95-
9699
/* task_struct::on_rq states: */
97100
#define TASK_ON_RQ_QUEUED 1
98101
#define TASK_ON_RQ_MIGRATING 2
@@ -362,9 +365,6 @@ extern void dl_server_init(struct sched_dl_entity *dl_se, struct rq *rq,
362365

363366
#ifdef CONFIG_CGROUP_SCHED
364367

365-
struct cfs_rq;
366-
struct rt_rq;
367-
368368
extern struct list_head task_groups;
369369

370370
struct cfs_bandwidth {
@@ -996,8 +996,6 @@ struct uclamp_rq {
996996
DECLARE_STATIC_KEY_FALSE(sched_uclamp_used);
997997
#endif /* CONFIG_UCLAMP_TASK */
998998

999-
struct rq;
1000-
1001999
struct balance_callback {
10021000
struct balance_callback *next;
10031001
void (*func)(struct rq *rq);
@@ -1255,8 +1253,6 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
12551253
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
12561254
#define raw_rq() raw_cpu_ptr(&runqueues)
12571255

1258-
struct sched_group;
1259-
12601256
#ifdef CONFIG_SCHED_CORE
12611257
static inline struct cpumask *sched_group_span(struct sched_group *sg);
12621258

0 commit comments

Comments
 (0)