diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-05-26 17:29:58 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-05-26 17:29:58 -0400 |
commit | a463f9a9e04385f0729f7435a0a6dff7d89b25de (patch) | |
tree | 00ff42c305926c800e18b13df8440a4de1a1a041 /include/litmus/sched_plugin.h | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
GPUSync patch for Litmus 2012.1.
Diffstat (limited to 'include/litmus/sched_plugin.h')
-rw-r--r-- | include/litmus/sched_plugin.h | 76 |
1 files changed, 74 insertions, 2 deletions
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h index 6e7cabdddae8..24a6858b4b0b 100644 --- a/include/litmus/sched_plugin.h +++ b/include/litmus/sched_plugin.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #include <litmus/locking.h> | 11 | #include <litmus/locking.h> |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | ||
15 | #include <litmus/kexclu_affinity.h> | ||
16 | #endif | ||
17 | |||
18 | #include <linux/interrupt.h> | ||
19 | |||
14 | /************************ setup/tear down ********************/ | 20 | /************************ setup/tear down ********************/ |
15 | 21 | ||
16 | typedef long (*activate_plugin_t) (void); | 22 | typedef long (*activate_plugin_t) (void); |
@@ -29,7 +35,6 @@ typedef struct task_struct* (*schedule_t)(struct task_struct * prev); | |||
29 | */ | 35 | */ |
30 | typedef void (*finish_switch_t)(struct task_struct *prev); | 36 | typedef void (*finish_switch_t)(struct task_struct *prev); |
31 | 37 | ||
32 | |||
33 | /********************* task state changes ********************/ | 38 | /********************* task state changes ********************/ |
34 | 39 | ||
35 | /* Called to setup a new real-time task. | 40 | /* Called to setup a new real-time task. |
@@ -58,6 +63,47 @@ typedef void (*task_exit_t) (struct task_struct *); | |||
58 | typedef long (*allocate_lock_t) (struct litmus_lock **lock, int type, | 63 | typedef long (*allocate_lock_t) (struct litmus_lock **lock, int type, |
59 | void* __user config); | 64 | void* __user config); |
60 | 65 | ||
66 | struct affinity_observer; | ||
67 | typedef long (*allocate_affinity_observer_t) ( | ||
68 | struct affinity_observer **aff_obs, int type, | ||
69 | void* __user config); | ||
70 | |||
71 | typedef void (*increase_prio_t)(struct task_struct* t, struct task_struct* prio_inh); | ||
72 | typedef void (*decrease_prio_t)(struct task_struct* t, struct task_struct* prio_inh); | ||
73 | typedef void (*nested_increase_prio_t)(struct task_struct* t, struct task_struct* prio_inh, | ||
74 | raw_spinlock_t *to_unlock, unsigned long irqflags); | ||
75 | typedef void (*nested_decrease_prio_t)(struct task_struct* t, struct task_struct* prio_inh, | ||
76 | raw_spinlock_t *to_unlock, unsigned long irqflags); | ||
77 | |||
78 | typedef void (*increase_prio_klitirq_t)(struct task_struct* klitirqd, | ||
79 | struct task_struct* old_owner, | ||
80 | struct task_struct* new_owner); | ||
81 | typedef void (*decrease_prio_klitirqd_t)(struct task_struct* klitirqd, | ||
82 | struct task_struct* old_owner); | ||
83 | |||
84 | |||
85 | typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet); | ||
86 | typedef void (*change_prio_pai_tasklet_t)(struct task_struct *old_prio, | ||
87 | struct task_struct *new_prio); | ||
88 | typedef void (*run_tasklets_t)(struct task_struct* next); | ||
89 | |||
90 | typedef raw_spinlock_t* (*get_dgl_spinlock_t) (struct task_struct *t); | ||
91 | |||
92 | |||
93 | typedef int (*higher_prio_t)(struct task_struct* a, struct task_struct* b); | ||
94 | |||
95 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | ||
96 | |||
97 | typedef enum | ||
98 | { | ||
99 | BASE, | ||
100 | EFFECTIVE | ||
101 | } comparison_mode_t; | ||
102 | |||
103 | typedef int (*__higher_prio_t)(struct task_struct* a, comparison_mode_t a_mod, | ||
104 | struct task_struct* b, comparison_mode_t b_mod); | ||
105 | #endif | ||
106 | |||
61 | 107 | ||
62 | /********************* sys call backends ********************/ | 108 | /********************* sys call backends ********************/ |
63 | /* This function causes the caller to sleep until the next release */ | 109 | /* This function causes the caller to sleep until the next release */ |
@@ -88,14 +134,40 @@ struct sched_plugin { | |||
88 | /* task state changes */ | 134 | /* task state changes */ |
89 | admit_task_t admit_task; | 135 | admit_task_t admit_task; |
90 | 136 | ||
91 | task_new_t task_new; | 137 | task_new_t task_new; |
92 | task_wake_up_t task_wake_up; | 138 | task_wake_up_t task_wake_up; |
93 | task_block_t task_block; | 139 | task_block_t task_block; |
94 | task_exit_t task_exit; | 140 | task_exit_t task_exit; |
95 | 141 | ||
142 | higher_prio_t compare; | ||
143 | |||
96 | #ifdef CONFIG_LITMUS_LOCKING | 144 | #ifdef CONFIG_LITMUS_LOCKING |
97 | /* locking protocols */ | 145 | /* locking protocols */ |
98 | allocate_lock_t allocate_lock; | 146 | allocate_lock_t allocate_lock; |
147 | increase_prio_t increase_prio; | ||
148 | decrease_prio_t decrease_prio; | ||
149 | #endif | ||
150 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | ||
151 | nested_increase_prio_t nested_increase_prio; | ||
152 | nested_decrease_prio_t nested_decrease_prio; | ||
153 | __higher_prio_t __compare; | ||
154 | #endif | ||
155 | #ifdef CONFIG_LITMUS_DGL_SUPPORT | ||
156 | get_dgl_spinlock_t get_dgl_spinlock; | ||
157 | #endif | ||
158 | |||
159 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | ||
160 | allocate_affinity_observer_t allocate_aff_obs; | ||
161 | #endif | ||
162 | |||
163 | #ifdef CONFIG_LITMUS_SOFTIRQD | ||
164 | increase_prio_klitirq_t increase_prio_klitirqd; | ||
165 | decrease_prio_klitirqd_t decrease_prio_klitirqd; | ||
166 | #endif | ||
167 | #ifdef CONFIG_LITMUS_PAI_SOFTIRQD | ||
168 | enqueue_pai_tasklet_t enqueue_pai_tasklet; | ||
169 | change_prio_pai_tasklet_t change_prio_pai_tasklet; | ||
170 | run_tasklets_t run_tasklets; | ||
99 | #endif | 171 | #endif |
100 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); | 172 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); |
101 | 173 | ||