Skip to content

Commit 029632f

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched: Make separate sched*.c translation units
Since once needs to do something at conferences and fixing compile warnings doesn't actually require much if any attention I decided to break up the sched.c #include "*.c" fest. This further modularizes the scheduler code. Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6068631 commit 029632f

File tree

14 files changed

+2059
-1979
lines changed

14 files changed

+2059
-1979
lines changed

include/linux/latencytop.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#define _INCLUDE_GUARD_LATENCYTOP_H_
1111

1212
#include <linux/compiler.h>
13+
struct task_struct;
14+
1315
#ifdef CONFIG_LATENCYTOP
1416

1517
#define LT_SAVECOUNT 32
@@ -23,7 +25,6 @@ struct latency_record {
2325
};
2426

2527

26-
struct task_struct;
2728

2829
extern int latencytop_enabled;
2930
void __account_scheduler_latency(struct task_struct *task, int usecs, int inter);

include/linux/sched.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
925925
return to_cpumask(sg->cpumask);
926926
}
927927

928+
/**
929+
* group_first_cpu - Returns the first cpu in the cpumask of a sched_group.
930+
* @group: The group whose first cpu is to be returned.
931+
*/
932+
static inline unsigned int group_first_cpu(struct sched_group *group)
933+
{
934+
return cpumask_first(sched_group_cpus(group));
935+
}
936+
928937
struct sched_domain_attr {
929938
int relax_domain_level;
930939
};

kernel/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
# Makefile for the linux kernel.
33
#
44

5-
obj-y = sched.o fork.o exec_domain.o panic.o printk.o \
5+
obj-y = fork.o exec_domain.o panic.o printk.o \
66
cpu.o exit.o itimer.o time.o softirq.o resource.o \
77
sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \
88
signal.o sys.o kmod.o workqueue.o pid.o \
99
rcupdate.o extable.o params.o posix-timers.o \
1010
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
1111
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
1212
notifier.o ksysfs.o sched_clock.o cred.o \
13-
async.o range.o
14-
obj-y += groups.o
13+
async.o range.o groups.o
14+
15+
obj-y += sched.o sched_idletask.o sched_fair.o sched_rt.o sched_stoptask.o
16+
obj-$(CONFIG_SCHED_AUTOGROUP) += sched_autogroup.o
17+
obj-$(CONFIG_SCHEDSTATS) += sched_stats.o
18+
obj-$(CONFIG_SCHED_DEBUG) += sched_debug.o
1519

1620
ifdef CONFIG_FUNCTION_TRACER
1721
# Do not trace debug files and internal ftrace files

0 commit comments

Comments
 (0)