diff options
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r-- | include/litmus/rt_param.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index d6d799174160..f50af3322c4b 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -75,6 +75,8 @@ struct control_page { | |||
75 | /* don't export internal data structures to user space (liblitmus) */ | 75 | /* don't export internal data structures to user space (liblitmus) */ |
76 | #ifdef __KERNEL__ | 76 | #ifdef __KERNEL__ |
77 | 77 | ||
78 | #include <linux/semaphore.h> | ||
79 | |||
78 | struct _rt_domain; | 80 | struct _rt_domain; |
79 | struct bheap_node; | 81 | struct bheap_node; |
80 | struct release_heap; | 82 | struct release_heap; |
@@ -100,6 +102,14 @@ struct rt_job { | |||
100 | 102 | ||
101 | struct pfair_param; | 103 | struct pfair_param; |
102 | 104 | ||
105 | enum klitirqd_sem_status | ||
106 | { | ||
107 | NEED_TO_REACQUIRE, | ||
108 | REACQUIRING, | ||
109 | NOT_HELD, | ||
110 | HELD | ||
111 | }; | ||
112 | |||
103 | /* RT task parameters for scheduling extensions | 113 | /* RT task parameters for scheduling extensions |
104 | * These parameters are inherited during clone and therefore must | 114 | * These parameters are inherited during clone and therefore must |
105 | * be explicitly set up before the task set is launched. | 115 | * be explicitly set up before the task set is launched. |
@@ -114,6 +124,38 @@ struct rt_param { | |||
114 | /* is the task present? (true if it can be scheduled) */ | 124 | /* is the task present? (true if it can be scheduled) */ |
115 | unsigned int present:1; | 125 | unsigned int present:1; |
116 | 126 | ||
127 | #ifdef CONFIG_LITMUS_SOFTIRQD | ||
128 | /* proxy threads have minimum priority by default */ | ||
129 | unsigned int is_proxy_thread:1; | ||
130 | |||
131 | /* pointer to klitirqd currently working on this | ||
132 | task_struct's behalf. only set by the task pointed | ||
133 | to by klitirqd. | ||
134 | |||
135 | ptr only valid if is_proxy_thread == 0 | ||
136 | */ | ||
137 | struct task_struct* cur_klitirqd; | ||
138 | |||
139 | /* Used to implement mutual execution exclusion between | ||
140 | * job and klitirqd execution. Job must always hold | ||
141 | * it's klitirqd_sem to execute. klitirqd instance | ||
142 | * must hold the semaphore before executing on behalf | ||
143 | * of a job. | ||
144 | */ | ||
145 | //struct semaphore klitirqd_sem; | ||
146 | struct mutex klitirqd_sem; | ||
147 | |||
148 | /* status of held klitirqd_sem, even if the held klitirqd_sem is from | ||
149 | another task (only proxy threads do this though). | ||
150 | */ | ||
151 | atomic_t klitirqd_sem_stat; | ||
152 | #endif | ||
153 | |||
154 | #ifdef CONFIG_LITMUS_NVIDIA | ||
155 | /* number of top-half interrupts handled on behalf of current job */ | ||
156 | atomic_t nv_int_count; | ||
157 | #endif | ||
158 | |||
117 | #ifdef CONFIG_LITMUS_LOCKING | 159 | #ifdef CONFIG_LITMUS_LOCKING |
118 | /* Is the task being priority-boosted by a locking protocol? */ | 160 | /* Is the task being priority-boosted by a locking protocol? */ |
119 | unsigned int priority_boosted:1; | 161 | unsigned int priority_boosted:1; |
@@ -134,7 +176,7 @@ struct rt_param { | |||
134 | * an increased task priority. | 176 | * an increased task priority. |
135 | */ | 177 | */ |
136 | struct task_struct* inh_task; | 178 | struct task_struct* inh_task; |
137 | 179 | ||
138 | #ifdef CONFIG_NP_SECTION | 180 | #ifdef CONFIG_NP_SECTION |
139 | /* For the FMLP under PSN-EDF, it is required to make the task | 181 | /* For the FMLP under PSN-EDF, it is required to make the task |
140 | * non-preemptive from kernel space. In order not to interfere with | 182 | * non-preemptive from kernel space. In order not to interfere with |