diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-06 05:23:43 -0400 |
---|---|---|
committer | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-23 10:06:12 -0400 |
commit | b5aadf7f14c1acc94956aa257e018e9de3881f41 (patch) | |
tree | 5add08715374d105dc16f4135e2445e4a3b65a17 /kernel | |
parent | 3b5d5c6b0ccba733a313f8752ebc3f8015628ba3 (diff) |
proc: move /proc/schedstat boilerplate to kernel/sched_stats.h
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 1 | ||||
-rw-r--r-- | kernel/sched_stats.h | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index d906f72b42d2..5a70189d5051 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/cpuset.h> | 55 | #include <linux/cpuset.h> |
56 | #include <linux/percpu.h> | 56 | #include <linux/percpu.h> |
57 | #include <linux/kthread.h> | 57 | #include <linux/kthread.h> |
58 | #include <linux/proc_fs.h> | ||
58 | #include <linux/seq_file.h> | 59 | #include <linux/seq_file.h> |
59 | #include <linux/sysctl.h> | 60 | #include <linux/sysctl.h> |
60 | #include <linux/syscalls.h> | 61 | #include <linux/syscalls.h> |
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index b8c156979cf2..3d14ce273902 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -90,13 +90,20 @@ static int schedstat_open(struct inode *inode, struct file *file) | |||
90 | return res; | 90 | return res; |
91 | } | 91 | } |
92 | 92 | ||
93 | const struct file_operations proc_schedstat_operations = { | 93 | static const struct file_operations proc_schedstat_operations = { |
94 | .open = schedstat_open, | 94 | .open = schedstat_open, |
95 | .read = seq_read, | 95 | .read = seq_read, |
96 | .llseek = seq_lseek, | 96 | .llseek = seq_lseek, |
97 | .release = single_release, | 97 | .release = single_release, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static int __init proc_schedstat_init(void) | ||
101 | { | ||
102 | proc_create("schedstat", 0, NULL, &proc_schedstat_operations); | ||
103 | return 0; | ||
104 | } | ||
105 | module_init(proc_schedstat_init); | ||
106 | |||
100 | /* | 107 | /* |
101 | * Expects runqueue lock to be held for atomicity of update | 108 | * Expects runqueue lock to be held for atomicity of update |
102 | */ | 109 | */ |