Skip to contentSkip to conversation

sched: make rt_sched_class, idle_sched_class static

PATCH Applied Harvey Harrison 3 participants 3 messages Apr 25, 2008 – Apr 26, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: make rt_sched_class, idle_sched_class static

The C files are included directly in sched.c, so they are effectively static.

---
 kernel/sched_idletask.c                          |    2 +-
 kernel/sched_rt.c                                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched_idletask.c +1 -1
index 2bcafa3..3a4f92d 100644
@@ -99,7 +99,7 @@ static void prio_changed_idle(struct rq *rq, struct task_struct *p,
 /*
  * Simple, special scheduling class for the per-CPU idle tasks:
  */
-const struct sched_class idle_sched_class = {
+static const struct sched_class idle_sched_class = {
 	/* .next is NULL */
 	/* no enqueue/yield_task for idle tasks */
 
kernel/sched_rt.c +1 -1
index c2730a5..dcd6495 100644
@@ -1309,7 +1309,7 @@ static void set_curr_task_rt(struct rq *rq)
 	p->se.exec_start = rq->clock;
 }
 
-const struct sched_class rt_sched_class = {
+static const struct sched_class rt_sched_class = {
 	.next			= &fair_sched_class,
 	.enqueue_task		= enqueue_task_rt,
 	.dequeue_task		= dequeue_task_rt,
Signature · 1 line
1.5.5.1.270.g89765
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Harvey Harrison

The C files are included directly in sched.c, so they are effectively static.

Quoted 31 lines
---
 kernel/sched_idletask.c                          |    2 +-
 kernel/sched_rt.c                                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched_idletask.c +1 -1
index 2bcafa3..3a4f92d 100644
@@ -99,7 +99,7 @@ static void prio_changed_idle(struct rq *rq, struct task_struct *p,
 /*
  * Simple, special scheduling class for the per-CPU idle tasks:
  */
-const struct sched_class idle_sched_class = {
+static const struct sched_class idle_sched_class = {
 	/* .next is NULL */
 	/* no enqueue/yield_task for idle tasks */
 
kernel/sched_rt.c +1 -1
index c2730a5..dcd6495 100644
@@ -1309,7 +1309,7 @@ static void set_curr_task_rt(struct rq *rq)
 	p->se.exec_start = rq->clock;
 }
 
-const struct sched_class rt_sched_class = {
+static const struct sched_class rt_sched_class = {
 	.next			= &fair_sched_class,
 	.enqueue_task		= enqueue_task_rt,
 	.dequeue_task		= dequeue_task_rt,