aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/sched_plugin.c')
-rw-r--r--litmus/sched_plugin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/litmus/sched_plugin.c b/litmus/sched_plugin.c
index 3767b30e610a..3543b7baff53 100644
--- a/litmus/sched_plugin.c
+++ b/litmus/sched_plugin.c
@@ -187,7 +187,7 @@ struct sched_plugin *litmus = &linux_sched_plugin;
187 187
188/* the list of registered scheduling plugins */ 188/* the list of registered scheduling plugins */
189static LIST_HEAD(sched_plugins); 189static LIST_HEAD(sched_plugins);
190static DEFINE_SPINLOCK(sched_plugins_lock); 190static DEFINE_RAW_SPINLOCK(sched_plugins_lock);
191 191
192#define CHECK(func) {\ 192#define CHECK(func) {\
193 if (!plugin->func) \ 193 if (!plugin->func) \
@@ -220,9 +220,9 @@ int register_sched_plugin(struct sched_plugin* plugin)
220 if (!plugin->release_at) 220 if (!plugin->release_at)
221 plugin->release_at = release_at; 221 plugin->release_at = release_at;
222 222
223 spin_lock(&sched_plugins_lock); 223 raw_spin_lock(&sched_plugins_lock);
224 list_add(&plugin->list, &sched_plugins); 224 list_add(&plugin->list, &sched_plugins);
225 spin_unlock(&sched_plugins_lock); 225 raw_spin_unlock(&sched_plugins_lock);
226 226
227 return 0; 227 return 0;
228} 228}
@@ -234,7 +234,7 @@ struct sched_plugin* find_sched_plugin(const char* name)
234 struct list_head *pos; 234 struct list_head *pos;
235 struct sched_plugin *plugin; 235 struct sched_plugin *plugin;
236 236
237 spin_lock(&sched_plugins_lock); 237 raw_spin_lock(&sched_plugins_lock);
238 list_for_each(pos, &sched_plugins) { 238 list_for_each(pos, &sched_plugins) {
239 plugin = list_entry(pos, struct sched_plugin, list); 239 plugin = list_entry(pos, struct sched_plugin, list);
240 if (!strcmp(plugin->plugin_name, name)) 240 if (!strcmp(plugin->plugin_name, name))
@@ -243,7 +243,7 @@ struct sched_plugin* find_sched_plugin(const char* name)
243 plugin = NULL; 243 plugin = NULL;
244 244
245out_unlock: 245out_unlock:
246 spin_unlock(&sched_plugins_lock); 246 raw_spin_unlock(&sched_plugins_lock);
247 return plugin; 247 return plugin;
248} 248}
249 249
@@ -253,13 +253,13 @@ int print_sched_plugins(char* buf, int max)
253 struct list_head *pos; 253 struct list_head *pos;
254 struct sched_plugin *plugin; 254 struct sched_plugin *plugin;
255 255
256 spin_lock(&sched_plugins_lock); 256 raw_spin_lock(&sched_plugins_lock);
257 list_for_each(pos, &sched_plugins) { 257 list_for_each(pos, &sched_plugins) {
258 plugin = list_entry(pos, struct sched_plugin, list); 258 plugin = list_entry(pos, struct sched_plugin, list);
259 count += snprintf(buf + count, max - count, "%s\n", plugin->plugin_name); 259 count += snprintf(buf + count, max - count, "%s\n", plugin->plugin_name);
260 if (max - count <= 0) 260 if (max - count <= 0)
261 break; 261 break;
262 } 262 }
263 spin_unlock(&sched_plugins_lock); 263 raw_spin_unlock(&sched_plugins_lock);
264 return count; 264 return count;
265} 265}