From 5a2b8be93c93f2c66edee2a8aff1554778959e35 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Sat, 8 Oct 2011 17:06:48 -0400 Subject: 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. --- litmus/rt_domain.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'litmus/rt_domain.c') 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 @@ #include /* Uncomment when debugging timer races... */ -#if 0 +#if 1 #define VTRACE_TASK TRACE_TASK #define VTRACE TRACE #else @@ -293,8 +293,7 @@ static void setup_release(rt_domain_t *_rt) #else arm_release_timer(rh); #endif - } else - VTRACE_TASK(t, "0x%p is not my timer\n", &rh->timer); + } } } @@ -439,6 +438,13 @@ static struct task_struct* pd_peek_ready(domain_t *dom) return __next_ready((rt_domain_t*)dom->data); } +static void pd_remove(domain_t *dom, struct task_struct *task) +{ + if (is_queued(task)) { + remove((rt_domain_t*)dom->data, task); + } +} + /* pd_domain_init - create a generic domain wrapper for an rt_domain */ void pd_domain_init(domain_t *dom, @@ -453,5 +459,6 @@ void pd_domain_init(domain_t *dom, domain_init(dom, &domain->ready_lock, pd_requeue, pd_peek_ready, pd_take_ready, preempt_needed, priority); + dom->remove = pd_remove; dom->data = domain; } -- cgit v1.2.2