aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2010-10-22 17:26:38 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-10-23 01:35:14 -0400
commit98f56816fcb5c97e0afd21a6e242bb72d5b7a551 (patch)
treed57ce043d568356d1050c74db6b512fed4783a79 /include/litmus
parent3dd41424090a0ca3a660218d06afe6ff4441bad3 (diff)
Litmus core: per-plugin proc directories
Change the Litmus proc layout so that loaded plugins are visible in /proc/litmus/plugins/loaded and add Litmus functions make_plugin_proc_dir() and remove_plugin_proc_dir() to add per-plugin proc directories.
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/litmus.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 5d20276e44f4..ccb6b137952b 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -9,6 +9,9 @@
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
12#ifdef CONFIG_RELEASE_MASTER 15#ifdef CONFIG_RELEASE_MASTER
13extern atomic_t release_master_cpu; 16extern atomic_t release_master_cpu;
14#endif 17#endif
@@ -62,6 +65,19 @@ void exit_litmus(struct task_struct *dead_tsk);
62long litmus_admit_task(struct task_struct *tsk); 65long litmus_admit_task(struct task_struct *tsk);
63void litmus_exit_task(struct task_struct *tsk); 66void litmus_exit_task(struct task_struct *tsk);
64 67
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
65#define is_realtime(t) ((t)->policy == SCHED_LITMUS) 81#define is_realtime(t) ((t)->policy == SCHED_LITMUS)
66#define rt_transition_pending(t) \ 82#define rt_transition_pending(t) \
67 ((t)->rt_param.transition_pending) 83 ((t)->rt_param.transition_pending)