aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2010-10-22 21:04:34 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-10-23 01:35:14 -0400
commite06e8374b5c04aeaddf14e9686842011f80f5664 (patch)
tree773c14713dbca67b5ea4cf4f7864dbc324ae9e44 /include
parent98f56816fcb5c97e0afd21a6e242bb72d5b7a551 (diff)
Litmus core: refactor the implementation of /proc
Diffstat (limited to 'include')
-rw-r--r--include/litmus/litmus.h16
-rw-r--r--include/litmus/litmus_proc.h19
2 files changed, 19 insertions, 16 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index ccb6b137952b..5d20276e44f4 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -9,9 +9,6 @@
9#include <linux/jiffies.h> 9#include <linux/jiffies.h>
10#include <litmus/sched_trace.h> 10#include <litmus/sched_trace.h>
11 11
12#include <litmus/sched_plugin.h>
13#include <linux/proc_fs.h>
14
15#ifdef CONFIG_RELEASE_MASTER 12#ifdef CONFIG_RELEASE_MASTER
16extern atomic_t release_master_cpu; 13extern atomic_t release_master_cpu;
17#endif 14#endif
@@ -65,19 +62,6 @@ void exit_litmus(struct task_struct *dead_tsk);
65long litmus_admit_task(struct task_struct *tsk); 62long litmus_admit_task(struct task_struct *tsk);
66void litmus_exit_task(struct task_struct *tsk); 63void litmus_exit_task(struct task_struct *tsk);
67 64
68/*
69 * On success, returns 0 and sets the pointer to the location of the new
70 * proc dir entry, otherwise returns an error code and sets pde to NULL.
71 */
72long make_plugin_proc_dir(struct sched_plugin* plugin,
73 struct proc_dir_entry** pde);
74
75/*
76 * Plugins should deallocate all child proc directory entries before
77 * calling this, to avoid memory leaks.
78 */
79void remove_plugin_proc_dir(struct sched_plugin* plugin);
80
81#define is_realtime(t) ((t)->policy == SCHED_LITMUS) 65#define is_realtime(t) ((t)->policy == SCHED_LITMUS)
82#define rt_transition_pending(t) \ 66#define rt_transition_pending(t) \
83 ((t)->rt_param.transition_pending) 67 ((t)->rt_param.transition_pending)
diff --git a/include/litmus/litmus_proc.h b/include/litmus/litmus_proc.h
new file mode 100644
index 000000000000..fbc0082b2d21
--- /dev/null
+++ b/include/litmus/litmus_proc.h
@@ -0,0 +1,19 @@
1#include <litmus/sched_plugin.h>
2#include <linux/proc_fs.h>
3
4int __init init_litmus_proc(void);
5void exit_litmus_proc(void);
6
7/*
8 * On success, returns 0 and sets the pointer to the location of the new
9 * proc dir entry, otherwise returns an error code and sets pde to NULL.
10 */
11long make_plugin_proc_dir(struct sched_plugin* plugin,
12 struct proc_dir_entry** pde);
13
14/*
15 * Plugins should deallocate all child proc directory entries before
16 * calling this, to avoid memory leaks.
17 */
18void remove_plugin_proc_dir(struct sched_plugin* plugin);
19