diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-02-14 08:56:40 -0500 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-08 10:12:49 -0500 |
commit | a83a958e62cb903e14bc458a5ace4b9f380fc802 (patch) | |
tree | a8a0a2cea9d0cfd31f5f989b92da7202048ad187 /litmus | |
parent | 5c3fc90c1f92c65f315166f8de9071615c08c088 (diff) |
LITMUS^RT core: add should_wait_for_stack() callback
Allow plugins to give up when waiting for a stack to become available.
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_plugin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/litmus/sched_plugin.c b/litmus/sched_plugin.c index 6ab5b85082c9..4007e5129e80 100644 --- a/litmus/sched_plugin.c +++ b/litmus/sched_plugin.c | |||
@@ -70,6 +70,11 @@ static struct task_struct* litmus_dummy_schedule(struct task_struct * prev) | |||
70 | return NULL; | 70 | return NULL; |
71 | } | 71 | } |
72 | 72 | ||
73 | static bool litmus_dummy_should_wait_for_stack(struct task_struct *next) | ||
74 | { | ||
75 | return true; /* by default, wait indefinitely */ | ||
76 | } | ||
77 | |||
73 | static long litmus_dummy_admit_task(struct task_struct* tsk) | 78 | static long litmus_dummy_admit_task(struct task_struct* tsk) |
74 | { | 79 | { |
75 | printk(KERN_CRIT "LITMUS^RT: Linux plugin rejects %s/%d.\n", | 80 | printk(KERN_CRIT "LITMUS^RT: Linux plugin rejects %s/%d.\n", |
@@ -186,6 +191,7 @@ int register_sched_plugin(struct sched_plugin* plugin) | |||
186 | /* make sure we don't trip over null pointers later */ | 191 | /* make sure we don't trip over null pointers later */ |
187 | CHECK(finish_switch); | 192 | CHECK(finish_switch); |
188 | CHECK(schedule); | 193 | CHECK(schedule); |
194 | CHECK(should_wait_for_stack); | ||
189 | CHECK(task_wake_up); | 195 | CHECK(task_wake_up); |
190 | CHECK(task_exit); | 196 | CHECK(task_exit); |
191 | CHECK(task_cleanup); | 197 | CHECK(task_cleanup); |