aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/sched_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/sched_plugin.h')
-rw-r--r--include/litmus/sched_plugin.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h
index 6e7cabdddae8..8fdf05dd7cd3 100644
--- a/include/litmus/sched_plugin.h
+++ b/include/litmus/sched_plugin.h
@@ -11,6 +11,8 @@
11#include <litmus/locking.h> 11#include <litmus/locking.h>
12#endif 12#endif
13 13
14#include <linux/interrupt.h>
15
14/************************ setup/tear down ********************/ 16/************************ setup/tear down ********************/
15 17
16typedef long (*activate_plugin_t) (void); 18typedef long (*activate_plugin_t) (void);
@@ -29,7 +31,6 @@ typedef struct task_struct* (*schedule_t)(struct task_struct * prev);
29 */ 31 */
30typedef void (*finish_switch_t)(struct task_struct *prev); 32typedef void (*finish_switch_t)(struct task_struct *prev);
31 33
32
33/********************* task state changes ********************/ 34/********************* task state changes ********************/
34 35
35/* Called to setup a new real-time task. 36/* Called to setup a new real-time task.
@@ -58,6 +59,21 @@ typedef void (*task_exit_t) (struct task_struct *);
58typedef long (*allocate_lock_t) (struct litmus_lock **lock, int type, 59typedef long (*allocate_lock_t) (struct litmus_lock **lock, int type,
59 void* __user config); 60 void* __user config);
60 61
62/* Called to change inheritance levels of given task */
63typedef void (*set_prio_inh_t)(struct task_struct* t,
64 struct task_struct* prio_inh);
65typedef void (*clear_prio_inh_t)(struct task_struct* t);
66
67
68typedef void (*set_prio_inh_klitirq_t)(struct task_struct* klitirqd,
69 struct task_struct* old_owner,
70 struct task_struct* new_owner);
71typedef void (*clear_prio_inh_klitirqd_t)(struct task_struct* klitirqd,
72 struct task_struct* old_owner);
73
74
75typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet);
76typedef void (*run_tasklets_t)(struct task_struct* next);
61 77
62/********************* sys call backends ********************/ 78/********************* sys call backends ********************/
63/* This function causes the caller to sleep until the next release */ 79/* This function causes the caller to sleep until the next release */
@@ -88,7 +104,7 @@ struct sched_plugin {
88 /* task state changes */ 104 /* task state changes */
89 admit_task_t admit_task; 105 admit_task_t admit_task;
90 106
91 task_new_t task_new; 107 task_new_t task_new;
92 task_wake_up_t task_wake_up; 108 task_wake_up_t task_wake_up;
93 task_block_t task_block; 109 task_block_t task_block;
94 task_exit_t task_exit; 110 task_exit_t task_exit;
@@ -96,6 +112,19 @@ struct sched_plugin {
96#ifdef CONFIG_LITMUS_LOCKING 112#ifdef CONFIG_LITMUS_LOCKING
97 /* locking protocols */ 113 /* locking protocols */
98 allocate_lock_t allocate_lock; 114 allocate_lock_t allocate_lock;
115
116 set_prio_inh_t set_prio_inh;
117 clear_prio_inh_t clear_prio_inh;
118#endif
119
120#ifdef CONFIG_LITMUS_SOFTIRQD
121 set_prio_inh_klitirq_t set_prio_inh_klitirqd;
122 clear_prio_inh_klitirqd_t clear_prio_inh_klitirqd;
123#endif
124
125#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
126 enqueue_pai_tasklet_t enqueue_pai_tasklet;
127 run_tasklets_t run_tasklets;
99#endif 128#endif
100} __attribute__ ((__aligned__(SMP_CACHE_BYTES))); 129} __attribute__ ((__aligned__(SMP_CACHE_BYTES)));
101 130