aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_domain.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/rt_domain.h')
-rw-r--r--include/litmus/rt_domain.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/litmus/rt_domain.h b/include/litmus/rt_domain.h
index 59e6b54e9281..ac249292e866 100644
--- a/include/litmus/rt_domain.h
+++ b/include/litmus/rt_domain.h
@@ -143,12 +143,26 @@ static inline struct task_struct* take_ready(rt_domain_t* rt)
143static inline void add_release(rt_domain_t* rt, struct task_struct *task) 143static inline void add_release(rt_domain_t* rt, struct task_struct *task)
144{ 144{
145 unsigned long flags; 145 unsigned long flags;
146 /* first we need the write lock for rt_ready_queue */
147 raw_spin_lock_irqsave(&rt->tobe_lock, flags); 146 raw_spin_lock_irqsave(&rt->tobe_lock, flags);
148 __add_release(rt, task); 147 __add_release(rt, task);
149 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags); 148 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags);
150} 149}
151 150
151#ifdef CONFIG_RELEASE_MASTER
152void __add_release_on(rt_domain_t* rt, struct task_struct *task,
153 int target_cpu);
154
155static inline void add_release_on(rt_domain_t* rt,
156 struct task_struct *task,
157 int target_cpu)
158{
159 unsigned long flags;
160 raw_spin_lock_irqsave(&rt->tobe_lock, flags);
161 __add_release_on(rt, task, target_cpu);
162 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags);
163}
164#endif
165
152static inline int __jobs_pending(rt_domain_t* rt) 166static inline int __jobs_pending(rt_domain_t* rt)
153{ 167{
154 return !bheap_empty(&rt->ready_queue); 168 return !bheap_empty(&rt->ready_queue);