aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-07-01 10:45:20 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-07-01 10:45:20 -0400
commit9b070bc6b676c62d4988da8699f0a731e733b318 (patch)
treea672d1b726cdce756f9a67786f0262cca776d3fe /include/litmus
parent0291b7547359c8e01ca1146ca8f2d5f321338ff8 (diff)
make inclusion of SRP support optional2008.1
we can disable it to improve performance when it is not needed
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/litmus.h4
-rw-r--r--include/litmus/sched_plugin.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 8a4c44999f..de2a3c2547 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -172,7 +172,11 @@ static inline lt_t litmus_clock(void)
172#define make_np(t) do {t->rt_param.kernel_np++;} while(0); 172#define make_np(t) do {t->rt_param.kernel_np++;} while(0);
173#define take_np(t) do {t->rt_param.kernel_np--;} while(0); 173#define take_np(t) do {t->rt_param.kernel_np--;} while(0);
174 174
175#ifdef CONFIG_SRP
175void srp_ceiling_block(void); 176void srp_ceiling_block(void);
177#else
178#define srp_ceiling_block() /* nothing */
179#endif
176 180
177#define heap2task(hn) ((struct task_struct*) hn->value) 181#define heap2task(hn) ((struct task_struct*) hn->value)
178 182
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h
index c26af80da8..aba75222fc 100644
--- a/include/litmus/sched_plugin.h
+++ b/include/litmus/sched_plugin.h
@@ -87,7 +87,9 @@ struct sched_plugin {
87 struct list_head list; 87 struct list_head list;
88 /* basic info */ 88 /* basic info */
89 char *plugin_name; 89 char *plugin_name;
90#ifdef CONFIG_SRP
90 unsigned int srp_active; 91 unsigned int srp_active;
92#endif
91 93
92 /* scheduler invocation */ 94 /* scheduler invocation */
93 scheduler_tick_t tick; 95 scheduler_tick_t tick;
@@ -124,7 +126,11 @@ int print_sched_plugins(char* buf, int max);
124 126
125static inline int srp_active(void) 127static inline int srp_active(void)
126{ 128{
129#ifdef CONFIG_SRP
127 return litmus->srp_active; 130 return litmus->srp_active;
131#else
132 return 0;
133#endif
128} 134}
129static inline int fmlp_active(void) 135static inline int fmlp_active(void)
130{ 136{