diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-12 12:54:50 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-12 12:54:50 -0400 |
commit | 85cab4f981e4ab90f20bf36031f6e3242f33ad7a (patch) | |
tree | 5ab9438de09cd903556f712ec716a04db56cb778 /litmus | |
parent | 72d790931b605257f4be4d1b7240981711ab3717 (diff) |
introduce release_at callback to LITMUS plugin interface
PFAIR needs to do things a bit differently. This callback
will allow plugins to handle synchronous releases differently.
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_plugin.c | 4 | ||||
-rw-r--r-- | litmus/sync.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/litmus/sched_plugin.c b/litmus/sched_plugin.c index f7eb116ee4..dbf709ee5e 100644 --- a/litmus/sched_plugin.c +++ b/litmus/sched_plugin.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <litmus/litmus.h> | 10 | #include <litmus/litmus.h> |
11 | #include <litmus/sched_plugin.h> | 11 | #include <litmus/sched_plugin.h> |
12 | 12 | ||
13 | #include <litmus/jobs.h> | ||
13 | 14 | ||
14 | /************************************************************* | 15 | /************************************************************* |
15 | * Dummy plugin functions * | 16 | * Dummy plugin functions * |
@@ -129,6 +130,9 @@ int register_sched_plugin(struct sched_plugin* plugin) | |||
129 | CHECK(pi_block); | 130 | CHECK(pi_block); |
130 | CHECK(admit_task); | 131 | CHECK(admit_task); |
131 | 132 | ||
133 | if (!plugin->release_at) | ||
134 | plugin->release_at = release_at; | ||
135 | |||
132 | spin_lock(&sched_plugins_lock); | 136 | spin_lock(&sched_plugins_lock); |
133 | list_add(&plugin->list, &sched_plugins); | 137 | list_add(&plugin->list, &sched_plugins); |
134 | spin_unlock(&sched_plugins_lock); | 138 | spin_unlock(&sched_plugins_lock); |
diff --git a/litmus/sync.c b/litmus/sync.c index 7c6ff2f03f..c16f1dd2ab 100644 --- a/litmus/sync.c +++ b/litmus/sync.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
12 | 12 | ||
13 | #include <litmus/litmus.h> | 13 | #include <litmus/litmus.h> |
14 | #include <litmus/sched_plugin.h> | ||
14 | #include <litmus/jobs.h> | 15 | #include <litmus/jobs.h> |
15 | 16 | ||
16 | static DECLARE_COMPLETION(ts_release); | 17 | static DECLARE_COMPLETION(ts_release); |
@@ -47,7 +48,7 @@ static long do_release_ts(lt_t start) | |||
47 | struct __wait_queue, | 48 | struct __wait_queue, |
48 | task_list)->private; | 49 | task_list)->private; |
49 | task_count++; | 50 | task_count++; |
50 | release_at(t, start + t->rt_param.task_params.phase); | 51 | litmus->release_at(t, start + t->rt_param.task_params.phase); |
51 | } | 52 | } |
52 | 53 | ||
53 | spin_unlock_irqrestore(&ts_release.wait.lock, flags); | 54 | spin_unlock_irqrestore(&ts_release.wait.lock, flags); |