Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b5aadf7f
Commit
b5aadf7f
authored
Oct 06, 2008
by
Alexey Dobriyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: move /proc/schedstat boilerplate to kernel/sched_stats.h
Signed-off-by:
Alexey Dobriyan
<
adobriyan@gmail.com
>
parent
3b5d5c6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+0
-3
include/linux/sched.h
include/linux/sched.h
+0
-4
kernel/sched.c
kernel/sched.c
+1
-0
kernel/sched_stats.h
kernel/sched_stats.h
+8
-1
No files found.
fs/proc/proc_misc.c
View file @
b5aadf7f
...
@@ -195,9 +195,6 @@ void __init proc_misc_init(void)
...
@@ -195,9 +195,6 @@ void __init proc_misc_init(void)
proc_symlink
(
"mounts"
,
NULL
,
"self/mounts"
);
proc_symlink
(
"mounts"
,
NULL
,
"self/mounts"
);
/* And now for trickier ones */
/* And now for trickier ones */
#ifdef CONFIG_SCHEDSTATS
proc_create
(
"schedstat"
,
0
,
NULL
,
&
proc_schedstat_operations
);
#endif
#ifdef CONFIG_PROC_KCORE
#ifdef CONFIG_PROC_KCORE
proc_root_kcore
=
proc_create
(
"kcore"
,
S_IRUSR
,
NULL
,
&
proc_kcore_operations
);
proc_root_kcore
=
proc_create
(
"kcore"
,
S_IRUSR
,
NULL
,
&
proc_kcore_operations
);
if
(
proc_root_kcore
)
if
(
proc_root_kcore
)
...
...
include/linux/sched.h
View file @
b5aadf7f
...
@@ -681,10 +681,6 @@ struct sched_info {
...
@@ -681,10 +681,6 @@ struct sched_info {
};
};
#endif
/* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
#endif
/* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
#ifdef CONFIG_SCHEDSTATS
extern
const
struct
file_operations
proc_schedstat_operations
;
#endif
/* CONFIG_SCHEDSTATS */
#ifdef CONFIG_TASK_DELAY_ACCT
#ifdef CONFIG_TASK_DELAY_ACCT
struct
task_delay_info
{
struct
task_delay_info
{
spinlock_t
lock
;
spinlock_t
lock
;
...
...
kernel/sched.c
View file @
b5aadf7f
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
#include <linux/cpuset.h>
#include <linux/cpuset.h>
#include <linux/percpu.h>
#include <linux/percpu.h>
#include <linux/kthread.h>
#include <linux/kthread.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
#include <linux/sysctl.h>
#include <linux/sysctl.h>
#include <linux/syscalls.h>
#include <linux/syscalls.h>
...
...
kernel/sched_stats.h
View file @
b5aadf7f
...
@@ -90,13 +90,20 @@ static int schedstat_open(struct inode *inode, struct file *file)
...
@@ -90,13 +90,20 @@ static int schedstat_open(struct inode *inode, struct file *file)
return
res
;
return
res
;
}
}
const
struct
file_operations
proc_schedstat_operations
=
{
static
const
struct
file_operations
proc_schedstat_operations
=
{
.
open
=
schedstat_open
,
.
open
=
schedstat_open
,
.
read
=
seq_read
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
.
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
* Expects runqueue lock to be held for atomicity of update
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment