diff options
Diffstat (limited to 'litmus/rt_domain.c')
-rw-r--r-- | litmus/rt_domain.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c index f781a2c61fc6..65c6e5c02f1e 100644 --- a/litmus/rt_domain.c +++ b/litmus/rt_domain.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
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 |
@@ -367,6 +367,7 @@ static void pd_requeue(domain_t *dom, struct task_struct *task) | |||
367 | rt_domain_t *domain = (rt_domain_t*)dom->data; | 367 | rt_domain_t *domain = (rt_domain_t*)dom->data; |
368 | BUG_ON(!task || !is_realtime(task)); | 368 | BUG_ON(!task || !is_realtime(task)); |
369 | BUG_ON(is_queued(task)); | 369 | BUG_ON(is_queued(task)); |
370 | BUG_ON(get_task_domain(task) != dom); | ||
370 | 371 | ||
371 | if (is_released(task, litmus_clock())) { | 372 | if (is_released(task, litmus_clock())) { |
372 | __add_ready(domain, task); | 373 | __add_ready(domain, task); |
@@ -396,17 +397,20 @@ static struct task_struct* pd_peek_ready(domain_t *dom) | |||
396 | 397 | ||
397 | /* pd_domain_init - create a generic domain wrapper for an rt_domain | 398 | /* pd_domain_init - create a generic domain wrapper for an rt_domain |
398 | */ | 399 | */ |
399 | void pd_domain_init(domain_t *dom, bheap_prio_t order, | 400 | void pd_domain_init(domain_t *dom, |
401 | bheap_prio_t order, | ||
400 | check_resched_needed_t check, | 402 | check_resched_needed_t check, |
401 | release_jobs_t release, | 403 | release_jobs_t release, |
402 | preempt_needed_t preempt_needed) | 404 | preempt_needed_t preempt_needed, |
405 | task_prio_t priority) | ||
403 | { | 406 | { |
404 | rt_domain_t *domain = kmalloc(sizeof(rt_domain_t), GFP_ATOMIC); | 407 | rt_domain_t *domain = kmalloc(sizeof(rt_domain_t), GFP_ATOMIC); |
405 | 408 | ||
406 | rt_domain_init(domain, order, check, release); | 409 | rt_domain_init(domain, order, check, release); |
407 | domain_init(dom, &domain->ready_lock, | 410 | domain_init(dom, &domain->ready_lock, |
408 | pd_requeue, pd_peek_ready, pd_take_ready, | 411 | pd_requeue, pd_peek_ready, pd_take_ready, |
409 | preempt_needed); | 412 | preempt_needed, priority); |
413 | dom->data = domain; | ||
410 | } | 414 | } |
411 | 415 | ||
412 | void pd_domain_free(domain_t *dom) | 416 | void pd_domain_free(domain_t *dom) |