aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-11-06 14:29:15 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-11-06 14:29:15 -0500
commit643415abd5c348edc4c0af471f2165af7d21f4e0 (patch)
tree317b9bd8a67a5a21700b9e2add026bbcb96438b3 /include
parent5091ac6ebbfb121ba218d04fa0d59cbdf4ba2bb1 (diff)
LITMUS: provide per-plugin setup/tear down callbacks
Give plugins a chance to set up state and clean up.
Diffstat (limited to 'include')
-rw-r--r--include/litmus/sched_plugin.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h
index aba75222fc..94952f6ccb 100644
--- a/include/litmus/sched_plugin.h
+++ b/include/litmus/sched_plugin.h
@@ -21,6 +21,12 @@ struct pi_semaphore {
21 struct task_struct *holder; 21 struct task_struct *holder;
22}; 22};
23 23
24/************************ setup/tear down ********************/
25
26typedef long (*activate_plugin_t) (void);
27typedef long (*deactivate_plugin_t) (void);
28
29
24 30
25/********************* scheduler invocation ******************/ 31/********************* scheduler invocation ******************/
26 32
@@ -75,6 +81,8 @@ typedef long (*return_priority_t) (struct pi_semaphore *sem);
75typedef long (*pi_block_t) (struct pi_semaphore *sem, struct task_struct *t); 81typedef long (*pi_block_t) (struct pi_semaphore *sem, struct task_struct *t);
76 82
77 83
84
85
78/********************* sys call backends ********************/ 86/********************* sys call backends ********************/
79/* This function causes the caller to sleep until the next release */ 87/* This function causes the caller to sleep until the next release */
80typedef long (*complete_job_t) (void); 88typedef long (*complete_job_t) (void);
@@ -87,6 +95,11 @@ struct sched_plugin {
87 struct list_head list; 95 struct list_head list;
88 /* basic info */ 96 /* basic info */
89 char *plugin_name; 97 char *plugin_name;
98
99 /* setup */
100 activate_plugin_t activate_plugin;
101 deactivate_plugin_t deactivate_plugin;
102
90#ifdef CONFIG_SRP 103#ifdef CONFIG_SRP
91 unsigned int srp_active; 104 unsigned int srp_active;
92#endif 105#endif
@@ -141,4 +154,6 @@ static inline int fmlp_active(void)
141#endif 154#endif
142} 155}
143 156
157extern struct sched_plugin linux_sched_plugin;
158
144#endif 159#endif