aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/rt_domain.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2011-10-08 17:06:48 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2011-10-08 17:06:48 -0400
commit5a2b8be93c93f2c66edee2a8aff1554778959e35 (patch)
tree931b54656e800f89b5479be520b9a9ca29ed6030 /litmus/rt_domain.c
parent61ce17e3edbf33e49adb5536c9904b735e58c774 (diff)
Fixed timer issue and atomic remove issue in level A domain.
Timers had an issue where they couldn't be cancelled before they migrated. Now when you set the start_on_info to inactive, it will prevent a timer from being armed. When a task is being blocked and preempted concurrently, the blocking code needs to be able to prevent the task from being scheduled on another CPU. This did not work for CE domains. Added a per-domain remove function which, for ce domains, will prevent a task from being returned by the domain.
Diffstat (limited to 'litmus/rt_domain.c')
-rw-r--r--litmus/rt_domain.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c
index ffb3cab9cffd..93f2a35fb29d 100644
--- a/litmus/rt_domain.c
+++ b/litmus/rt_domain.c
@@ -20,7 +20,7 @@
20#include <litmus/bheap.h> 20#include <litmus/bheap.h>
21 21
22/* Uncomment when debugging timer races... */ 22/* Uncomment when debugging timer races... */
23#if 0 23#if 1
24#define VTRACE_TASK TRACE_TASK 24#define VTRACE_TASK TRACE_TASK
25#define VTRACE TRACE 25#define VTRACE TRACE
26#else 26#else
@@ -293,8 +293,7 @@ static void setup_release(rt_domain_t *_rt)
293#else 293#else
294 arm_release_timer(rh); 294 arm_release_timer(rh);
295#endif 295#endif
296 } else 296 }
297 VTRACE_TASK(t, "0x%p is not my timer\n", &rh->timer);
298 } 297 }
299} 298}
300 299
@@ -439,6 +438,13 @@ static struct task_struct* pd_peek_ready(domain_t *dom)
439 return __next_ready((rt_domain_t*)dom->data); 438 return __next_ready((rt_domain_t*)dom->data);
440} 439}
441 440
441static void pd_remove(domain_t *dom, struct task_struct *task)
442{
443 if (is_queued(task)) {
444 remove((rt_domain_t*)dom->data, task);
445 }
446}
447
442/* pd_domain_init - create a generic domain wrapper for an rt_domain 448/* pd_domain_init - create a generic domain wrapper for an rt_domain
443 */ 449 */
444void pd_domain_init(domain_t *dom, 450void pd_domain_init(domain_t *dom,
@@ -453,5 +459,6 @@ void pd_domain_init(domain_t *dom,
453 domain_init(dom, &domain->ready_lock, 459 domain_init(dom, &domain->ready_lock,
454 pd_requeue, pd_peek_ready, pd_take_ready, 460 pd_requeue, pd_peek_ready, pd_take_ready,
455 preempt_needed, priority); 461 preempt_needed, priority);
462 dom->remove = pd_remove;
456 dom->data = domain; 463 dom->data = domain;
457} 464}