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 /include/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 'include/litmus')
-rw-r--r-- | include/litmus/sched_plugin.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h index 0c2aabad40c9..1906a139e6e9 100644 --- a/include/litmus/sched_plugin.h +++ b/include/litmus/sched_plugin.h | |||
@@ -29,6 +29,12 @@ typedef struct task_struct* (*schedule_t)(struct task_struct * prev); | |||
29 | typedef void (*finish_switch_t)(struct task_struct *prev); | 29 | typedef void (*finish_switch_t)(struct task_struct *prev); |
30 | 30 | ||
31 | 31 | ||
32 | /* When waiting for the stack of the task selected by the plugin | ||
33 | * to become available, this callback is invoked to give the | ||
34 | * plugin a chance to cancel the wait. If the plugin returns false, | ||
35 | * the scheduler is invoked again. */ | ||
36 | typedef bool (*should_wait_for_stack_t)(struct task_struct *next); | ||
37 | |||
32 | /********************* task state changes ********************/ | 38 | /********************* task state changes ********************/ |
33 | 39 | ||
34 | /* Called to setup a new real-time task. | 40 | /* Called to setup a new real-time task. |
@@ -103,6 +109,7 @@ struct sched_plugin { | |||
103 | /* scheduler invocation */ | 109 | /* scheduler invocation */ |
104 | schedule_t schedule; | 110 | schedule_t schedule; |
105 | finish_switch_t finish_switch; | 111 | finish_switch_t finish_switch; |
112 | should_wait_for_stack_t should_wait_for_stack; | ||
106 | 113 | ||
107 | /* syscall backend */ | 114 | /* syscall backend */ |
108 | complete_job_t complete_job; | 115 | complete_job_t complete_job; |