aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2011-04-03 05:05:25 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2011-04-03 05:05:25 -0400
commit080b5d97e8407994a1c697a1b5929ce3209db03c (patch)
tree30b115ea24b2c9dfb3ae1443f02db7cb1ca899e7 /include
parentc0574e57efc2efcf40d8e3dba034deb04dad11c1 (diff)
parentde6f505d545a075b0ddef243c71f82acbd22ba60 (diff)
Merge branch 'wip-edf-hsb' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-edf-hsb
Conflicts: litmus/sched_edf_hsb.c litmus/servers.c
Diffstat (limited to 'include')
-rw-r--r--include/litmus/rt_domain.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/litmus/rt_domain.h b/include/litmus/rt_domain.h
index ac249292e866..0756f30f1387 100644
--- a/include/litmus/rt_domain.h
+++ b/include/litmus/rt_domain.h
@@ -80,7 +80,7 @@ void rt_domain_init(rt_domain_t *rt, bheap_prio_t order,
80 80
81void __add_ready(rt_domain_t* rt, struct task_struct *new); 81void __add_ready(rt_domain_t* rt, struct task_struct *new);
82void __merge_ready(rt_domain_t* rt, struct bheap *tasks); 82void __merge_ready(rt_domain_t* rt, struct bheap *tasks);
83void __add_release(rt_domain_t* rt, struct task_struct *task); 83int __add_release(rt_domain_t* rt, struct task_struct *task);
84 84
85static inline struct task_struct* __take_ready(rt_domain_t* rt) 85static inline struct task_struct* __take_ready(rt_domain_t* rt)
86{ 86{
@@ -140,26 +140,31 @@ static inline struct task_struct* take_ready(rt_domain_t* rt)
140} 140}
141 141
142 142
143static inline void add_release(rt_domain_t* rt, struct task_struct *task) 143static inline int add_release(rt_domain_t* rt, struct task_struct *task)
144{ 144{
145 int rv;
145 unsigned long flags; 146 unsigned long flags;
146 raw_spin_lock_irqsave(&rt->tobe_lock, flags); 147 raw_spin_lock_irqsave(&rt->tobe_lock, flags);
147 __add_release(rt, task); 148 rv = __add_release(rt, task);
148 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags); 149 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags);
150 return rv;
149} 151}
150 152
151#ifdef CONFIG_RELEASE_MASTER 153#ifdef CONFIG_RELEASE_MASTER
152void __add_release_on(rt_domain_t* rt, struct task_struct *task, 154int __add_release_on(rt_domain_t* rt, struct task_struct *task,
153 int target_cpu); 155 int target_cpu);
154 156
155static inline void add_release_on(rt_domain_t* rt, 157static inline int add_release_on(rt_domain_t* rt,
156 struct task_struct *task, 158 struct task_struct *task,
157 int target_cpu) 159 int target_cpu)
158{ 160{
161 int rv;
159 unsigned long flags; 162 unsigned long flags;
160 raw_spin_lock_irqsave(&rt->tobe_lock, flags); 163 raw_spin_lock_irqsave(&rt->tobe_lock, flags);
161 __add_release_on(rt, task, target_cpu); 164 rv = __add_release_on(rt, task, target_cpu);
162 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags); 165 raw_spin_unlock_irqrestore(&rt->tobe_lock, flags);
166
167 return rv;
163} 168}
164#endif 169#endif
165 170