summaryrefslogtreecommitdiffstats
path: root/kernel/sched_stats.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-10-06 11:23:43 +0200
committerAlexey Dobriyan <adobriyan@gmail.com>2008-10-23 16:06:12 +0200
commitb5aadf7f14c1acc94956aa257e018e9de3881f41 (patch)
tree5add08715374d105dc16f4135e2445e4a3b65a17 /kernel/sched_stats.h
parentproc: move /proc/modules boilerplate to kernel/module.c (diff)
downloadlinux-b5aadf7f14c1acc94956aa257e018e9de3881f41.tar.xz
linux-b5aadf7f14c1acc94956aa257e018e9de3881f41.zip
proc: move /proc/schedstat boilerplate to kernel/sched_stats.h
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'kernel/sched_stats.h')
-rw-r--r--kernel/sched_stats.h9
1 files changed, 8 insertions, 1 deletions
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)
return res;
}
-const struct file_operations proc_schedstat_operations = {
+static const struct file_operations proc_schedstat_operations = {
.open = schedstat_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
+static int __init proc_schedstat_init(void)
+{
+ proc_create("schedstat", 0, NULL, &proc_schedstat_operations);
+ return 0;
+}
+module_init(proc_schedstat_init);
+
/*
* Expects runqueue lock to be held for atomicity of update
*/