diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2014-07-16 10:52:13 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-20 14:30:32 -0400 |
commit | c1e58e8d55c4162a6b603c52eaa46783e6f6d9da (patch) | |
tree | 7e975b2155a4a37d369dea9ff92391b8af9e17c2 /litmus | |
parent | 59a6e9efdd1b75c6e2c4a07bad361b4fa7aa741c (diff) |
Add reservation creation API to plugin interface & syscalls
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/litmus.c | 10 | ||||
-rw-r--r-- | litmus/sched_plugin.c | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index ed739082af5b..ed8e4127207e 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -317,6 +317,16 @@ asmlinkage long sys_null_call(cycles_t __user *ts) | |||
317 | return ret; | 317 | return ret; |
318 | } | 318 | } |
319 | 319 | ||
320 | asmlinkage long sys_reservation_create(int type, void __user *config) | ||
321 | { | ||
322 | return litmus->reservation_create(type, config); | ||
323 | } | ||
324 | |||
325 | asmlinkage long sys_reservation_destroy(unsigned int reservation_id, int cpu) | ||
326 | { | ||
327 | return litmus->reservation_destroy(reservation_id, cpu); | ||
328 | } | ||
329 | |||
320 | /* p is a real-time task. Re-init its state as a best-effort task. */ | 330 | /* p is a real-time task. Re-init its state as a best-effort task. */ |
321 | static void reinit_litmus_state(struct task_struct* p, int restore) | 331 | static void reinit_litmus_state(struct task_struct* p, int restore) |
322 | { | 332 | { |
diff --git a/litmus/sched_plugin.c b/litmus/sched_plugin.c index a9fe3f5e7349..4b4e1adc1a9a 100644 --- a/litmus/sched_plugin.c +++ b/litmus/sched_plugin.c | |||
@@ -153,6 +153,17 @@ static long litmus_dummy_allocate_lock(struct litmus_lock **lock, int type, | |||
153 | 153 | ||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | static long litmus_dummy_reservation_create( | ||
157 | int reservation_type, | ||
158 | void* __user config) | ||
159 | { | ||
160 | return -ENOSYS; | ||
161 | } | ||
162 | |||
163 | static long litmus_dummy_reservation_destroy(unsigned int reservation_id, int cpu) | ||
164 | { | ||
165 | return -ENOSYS; | ||
166 | } | ||
156 | 167 | ||
157 | /* The default scheduler plugin. It doesn't do anything and lets Linux do its | 168 | /* The default scheduler plugin. It doesn't do anything and lets Linux do its |
158 | * job. | 169 | * job. |
@@ -218,6 +229,8 @@ int register_sched_plugin(struct sched_plugin* plugin) | |||
218 | CHECK(admit_task); | 229 | CHECK(admit_task); |
219 | CHECK(fork_task); | 230 | CHECK(fork_task); |
220 | CHECK(synchronous_release_at); | 231 | CHECK(synchronous_release_at); |
232 | CHECK(reservation_destroy); | ||
233 | CHECK(reservation_create); | ||
221 | 234 | ||
222 | if (!plugin->wait_for_release_at) | 235 | if (!plugin->wait_for_release_at) |
223 | plugin->wait_for_release_at = default_wait_for_release_at; | 236 | plugin->wait_for_release_at = default_wait_for_release_at; |