From 81b8eb2ae452c241df9b3a1fb2116fa4d5adcb75 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Tue, 26 Jul 2011 22:03:18 -0400 Subject: C-EDF: rename lock -> cluster_lock The macro lock conflicts with locking protocols... --- litmus/sched_cedf.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'litmus/sched_cedf.c') diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index 8b3f8a7e2609..480c62bc895b 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c @@ -99,7 +99,7 @@ typedef struct clusterdomain { struct bheap_node *heap_node; struct bheap cpu_heap; /* lock for this cluster */ -#define lock domain.ready_lock +#define cluster_lock domain.ready_lock } cedf_domain_t; /* a cedf_domain per cluster; allocation is done at init/activation time */ @@ -331,12 +331,12 @@ static void cedf_release_jobs(rt_domain_t* rt, struct bheap* tasks) cedf_domain_t* cluster = container_of(rt, cedf_domain_t, domain); unsigned long flags; - raw_spin_lock_irqsave(&cluster->lock, flags); + raw_spin_lock_irqsave(&cluster->cluster_lock, flags); __merge_ready(&cluster->domain, tasks); check_for_preemptions(cluster); - raw_spin_unlock_irqrestore(&cluster->lock, flags); + raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); } /* caller holds cedf_lock */ @@ -427,7 +427,7 @@ static struct task_struct* cedf_schedule(struct task_struct * prev) } #endif - raw_spin_lock(&cluster->lock); + raw_spin_lock(&cluster->cluster_lock); clear_will_schedule(); /* sanity checking */ @@ -511,7 +511,7 @@ static struct task_struct* cedf_schedule(struct task_struct * prev) next = prev; sched_state_task_picked(); - raw_spin_unlock(&cluster->lock); + raw_spin_unlock(&cluster->cluster_lock); #ifdef WANT_ALL_SCHED_EVENTS TRACE("cedf_lock released, next=0x%p\n", next); @@ -553,7 +553,7 @@ static void cedf_task_new(struct task_struct * t, int on_rq, int running) /* the cluster doesn't change even if t is running */ cluster = task_cpu_cluster(t); - raw_spin_lock_irqsave(&cluster->domain.ready_lock, flags); + raw_spin_lock_irqsave(&cluster->cluster_lock, flags); /* setup job params */ release_at(t, litmus_clock()); @@ -580,7 +580,7 @@ static void cedf_task_new(struct task_struct * t, int on_rq, int running) t->rt_param.linked_on = NO_CPU; cedf_job_arrival(t); - raw_spin_unlock_irqrestore(&(cluster->domain.ready_lock), flags); + raw_spin_unlock_irqrestore(&(cluster->cluster_lock), flags); } static void cedf_task_wake_up(struct task_struct *task) @@ -593,7 +593,7 @@ static void cedf_task_wake_up(struct task_struct *task) cluster = task_cpu_cluster(task); - raw_spin_lock_irqsave(&cluster->lock, flags); + raw_spin_lock_irqsave(&cluster->cluster_lock, flags); /* We need to take suspensions because of semaphores into * account! If a job resumes after being suspended due to acquiring * a semaphore, it should never be treated as a new job release. @@ -616,7 +616,7 @@ static void cedf_task_wake_up(struct task_struct *task) } } cedf_job_arrival(task); - raw_spin_unlock_irqrestore(&cluster->lock, flags); + raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); } static void cedf_task_block(struct task_struct *t) @@ -629,9 +629,9 @@ static void cedf_task_block(struct task_struct *t) cluster = task_cpu_cluster(t); /* unlink if necessary */ - raw_spin_lock_irqsave(&cluster->lock, flags); + raw_spin_lock_irqsave(&cluster->cluster_lock, flags); unlink(t); - raw_spin_unlock_irqrestore(&cluster->lock, flags); + raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); BUG_ON(!is_realtime(t)); } @@ -643,7 +643,7 @@ static void cedf_task_exit(struct task_struct * t) cedf_domain_t *cluster = task_cpu_cluster(t); /* unlink if necessary */ - raw_spin_lock_irqsave(&cluster->lock, flags); + raw_spin_lock_irqsave(&cluster->cluster_lock, flags); unlink(t); if (tsk_rt(t)->scheduled_on != NO_CPU) { cpu_entry_t *cpu; @@ -651,7 +651,7 @@ static void cedf_task_exit(struct task_struct * t) cpu->scheduled = NULL; tsk_rt(t)->scheduled_on = NO_CPU; } - raw_spin_unlock_irqrestore(&cluster->lock, flags); + raw_spin_unlock_irqrestore(&cluster->cluster_lock, flags); BUG_ON(!is_realtime(t)); TRACE_TASK(t, "RIP\n"); -- cgit v1.2.2