diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-07-01 10:45:20 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-07-01 10:45:20 -0400 |
commit | 9b070bc6b676c62d4988da8699f0a731e733b318 (patch) | |
tree | a672d1b726cdce756f9a67786f0262cca776d3fe /include/litmus | |
parent | 0291b7547359c8e01ca1146ca8f2d5f321338ff8 (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.h | 4 | ||||
-rw-r--r-- | include/litmus/sched_plugin.h | 6 |
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 | ||
175 | void srp_ceiling_block(void); | 176 | void 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 | ||
125 | static inline int srp_active(void) | 127 | static 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 | } |
129 | static inline int fmlp_active(void) | 135 | static inline int fmlp_active(void) |
130 | { | 136 | { |