diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-02-05 13:58:19 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-02-05 13:58:19 -0500 |
commit | cd736578337f012c0acffa4b5296736c3902431e (patch) | |
tree | 7047869629f5e805515965ff3fd7c24c6dd508e1 /litmus/ikglp_lock.c | |
parent | 2e5c4482a4104da4e7cda6b3588f840a2c598741 (diff) |
change "nil/-1" to "null/0" to match prop. m-line
Diffstat (limited to 'litmus/ikglp_lock.c')
-rw-r--r-- | litmus/ikglp_lock.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/litmus/ikglp_lock.c b/litmus/ikglp_lock.c index fe242c789318..59d7ee4f9fd1 100644 --- a/litmus/ikglp_lock.c +++ b/litmus/ikglp_lock.c | |||
@@ -192,8 +192,8 @@ static void print_donees(struct ikglp_semaphore *sem, struct binheap_node *n, in | |||
192 | padding, | 192 | padding, |
193 | donee_node->task->comm, | 193 | donee_node->task->comm, |
194 | donee_node->task->pid, | 194 | donee_node->task->pid, |
195 | (donor) ? donor->comm : "nil", | 195 | (donor) ? donor->comm : "null", |
196 | (donor) ? donor->pid : -1, | 196 | (donor) ? donor->pid : 0, |
197 | ikglp_get_idx(sem, donee_node->fq)); | 197 | ikglp_get_idx(sem, donee_node->fq)); |
198 | 198 | ||
199 | if(n->left) print_donees(sem, n->left, depth+1); | 199 | if(n->left) print_donees(sem, n->left, depth+1); |
@@ -493,8 +493,8 @@ static void ikglp_refresh_owners_prio_decrease(struct fifo_queue *fq, | |||
493 | 493 | ||
494 | if(litmus->__compare(new_max_eff_prio, BASE, owner, BASE)) { | 494 | if(litmus->__compare(new_max_eff_prio, BASE, owner, BASE)) { |
495 | TRACE_CUR("%s/%d has greater base priority than base priority of owner (%s/%d) of fq %d.\n", | 495 | TRACE_CUR("%s/%d has greater base priority than base priority of owner (%s/%d) of fq %d.\n", |
496 | (new_max_eff_prio) ? new_max_eff_prio->comm : "nil", | 496 | (new_max_eff_prio) ? new_max_eff_prio->comm : "null", |
497 | (new_max_eff_prio) ? new_max_eff_prio->pid : -1, | 497 | (new_max_eff_prio) ? new_max_eff_prio->pid : 0, |
498 | owner->comm, | 498 | owner->comm, |
499 | owner->pid, | 499 | owner->pid, |
500 | ikglp_get_idx(sem, fq)); | 500 | ikglp_get_idx(sem, fq)); |
@@ -503,8 +503,8 @@ static void ikglp_refresh_owners_prio_decrease(struct fifo_queue *fq, | |||
503 | } | 503 | } |
504 | else { | 504 | else { |
505 | TRACE_CUR("%s/%d has lesser base priority than base priority of owner (%s/%d) of fq %d.\n", | 505 | TRACE_CUR("%s/%d has lesser base priority than base priority of owner (%s/%d) of fq %d.\n", |
506 | (new_max_eff_prio) ? new_max_eff_prio->comm : "nil", | 506 | (new_max_eff_prio) ? new_max_eff_prio->comm : "null", |
507 | (new_max_eff_prio) ? new_max_eff_prio->pid : -1, | 507 | (new_max_eff_prio) ? new_max_eff_prio->pid : 0, |
508 | owner->comm, | 508 | owner->comm, |
509 | owner->pid, | 509 | owner->pid, |
510 | ikglp_get_idx(sem, fq)); | 510 | ikglp_get_idx(sem, fq)); |
@@ -889,8 +889,8 @@ static void ikglp_enqueue_on_donor(struct ikglp_semaphore *sem, | |||
889 | } | 889 | } |
890 | else { | 890 | else { |
891 | TRACE_TASK(t, "No change in effective priority (it is %s/%d).\n", | 891 | TRACE_TASK(t, "No change in effective priority (it is %s/%d).\n", |
892 | (new_max_eff_prio) ? new_max_eff_prio->comm : "nil", | 892 | (new_max_eff_prio) ? new_max_eff_prio->comm : "null", |
893 | (new_max_eff_prio) ? new_max_eff_prio->pid : -1); | 893 | (new_max_eff_prio) ? new_max_eff_prio->pid : 0); |
894 | raw_spin_unlock(&tsk_rt(donee)->hp_blocked_tasks_lock); | 894 | raw_spin_unlock(&tsk_rt(donee)->hp_blocked_tasks_lock); |
895 | unlock_fine_irqrestore(&sem->lock, flags); | 895 | unlock_fine_irqrestore(&sem->lock, flags); |
896 | } | 896 | } |
@@ -1078,9 +1078,9 @@ static ikglp_wait_state_t* ikglp_find_hp_waiter_to_steal( | |||
1078 | ikglp_get_idx(sem, &sem->fifo_queues[i]), | 1078 | ikglp_get_idx(sem, &sem->fifo_queues[i]), |
1079 | sem->fifo_queues[i].hp_waiter->comm, | 1079 | sem->fifo_queues[i].hp_waiter->comm, |
1080 | sem->fifo_queues[i].hp_waiter->pid, | 1080 | sem->fifo_queues[i].hp_waiter->pid, |
1081 | (fq) ? ikglp_get_idx(sem, fq) : -1, | 1081 | (fq) ? ikglp_get_idx(sem, fq) : 0, |
1082 | (fq) ? ((fq->hp_waiter) ? fq->hp_waiter->comm : "nil") : "nilXX", | 1082 | (fq) ? ((fq->hp_waiter) ? fq->hp_waiter->comm : "null") : "nullXX", |
1083 | (fq) ? ((fq->hp_waiter) ? fq->hp_waiter->pid : -1) : -2); | 1083 | (fq) ? ((fq->hp_waiter) ? fq->hp_waiter->pid : 0) : -2); |
1084 | 1084 | ||
1085 | fq = &sem->fifo_queues[i]; | 1085 | fq = &sem->fifo_queues[i]; |
1086 | 1086 | ||
@@ -1151,8 +1151,8 @@ static void ikglp_steal_to_fq(struct ikglp_semaphore *sem, | |||
1151 | fq_steal->hp_waiter = ikglp_find_hp_waiter(fq_steal, NULL); | 1151 | fq_steal->hp_waiter = ikglp_find_hp_waiter(fq_steal, NULL); |
1152 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", | 1152 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", |
1153 | ikglp_get_idx(sem, fq_steal), | 1153 | ikglp_get_idx(sem, fq_steal), |
1154 | (fq_steal->hp_waiter) ? fq_steal->hp_waiter->comm : "nil", | 1154 | (fq_steal->hp_waiter) ? fq_steal->hp_waiter->comm : "null", |
1155 | (fq_steal->hp_waiter) ? fq_steal->hp_waiter->pid : -1); | 1155 | (fq_steal->hp_waiter) ? fq_steal->hp_waiter->pid : 0); |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | 1158 | ||
@@ -1450,8 +1450,8 @@ int ikglp_unlock(struct litmus_lock* l) | |||
1450 | other_fq->hp_waiter = ikglp_find_hp_waiter(other_fq, NULL); | 1450 | other_fq->hp_waiter = ikglp_find_hp_waiter(other_fq, NULL); |
1451 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", | 1451 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", |
1452 | ikglp_get_idx(sem, other_fq), | 1452 | ikglp_get_idx(sem, other_fq), |
1453 | (other_fq->hp_waiter) ? other_fq->hp_waiter->comm : "nil", | 1453 | (other_fq->hp_waiter) ? other_fq->hp_waiter->comm : "null", |
1454 | (other_fq->hp_waiter) ? other_fq->hp_waiter->pid : -1); | 1454 | (other_fq->hp_waiter) ? other_fq->hp_waiter->pid : 0); |
1455 | 1455 | ||
1456 | ikglp_refresh_owners_prio_decrease(other_fq, sem, flags); // unlocks sem->lock. reacquire it. | 1456 | ikglp_refresh_owners_prio_decrease(other_fq, sem, flags); // unlocks sem->lock. reacquire it. |
1457 | lock_fine_irqsave(&sem->lock, flags); // there should be no contention!!!! | 1457 | lock_fine_irqsave(&sem->lock, flags); // there should be no contention!!!! |
@@ -1489,8 +1489,8 @@ int ikglp_unlock(struct litmus_lock* l) | |||
1489 | 1489 | ||
1490 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", | 1490 | TRACE_TASK(t, "New hp_waiter for fq %d is %s/%d!\n", |
1491 | ikglp_get_idx(sem, fq), | 1491 | ikglp_get_idx(sem, fq), |
1492 | (fq->hp_waiter) ? fq->hp_waiter->comm : "nil", | 1492 | (fq->hp_waiter) ? fq->hp_waiter->comm : "null", |
1493 | (fq->hp_waiter) ? fq->hp_waiter->pid : -1); | 1493 | (fq->hp_waiter) ? fq->hp_waiter->pid : 0); |
1494 | } | 1494 | } |
1495 | } | 1495 | } |
1496 | else { | 1496 | else { |
@@ -1536,8 +1536,8 @@ wake_kludge: | |||
1536 | fq->hp_waiter = ikglp_find_hp_waiter(fq, NULL); | 1536 | fq->hp_waiter = ikglp_find_hp_waiter(fq, NULL); |
1537 | TRACE_TASK(next, "New hp_waiter for fq %d is %s/%d!\n", | 1537 | TRACE_TASK(next, "New hp_waiter for fq %d is %s/%d!\n", |
1538 | ikglp_get_idx(sem, fq), | 1538 | ikglp_get_idx(sem, fq), |
1539 | (fq->hp_waiter) ? fq->hp_waiter->comm : "nil", | 1539 | (fq->hp_waiter) ? fq->hp_waiter->comm : "null", |
1540 | (fq->hp_waiter) ? fq->hp_waiter->pid : -1); | 1540 | (fq->hp_waiter) ? fq->hp_waiter->pid : 0); |
1541 | 1541 | ||
1542 | fq->nest.hp_waiter_eff_prio = (fq->hp_waiter) ? | 1542 | fq->nest.hp_waiter_eff_prio = (fq->hp_waiter) ? |
1543 | effective_priority(fq->hp_waiter) : NULL; | 1543 | effective_priority(fq->hp_waiter) : NULL; |
@@ -1568,8 +1568,8 @@ wake_kludge: | |||
1568 | * waiter's priority. */ | 1568 | * waiter's priority. */ |
1569 | TRACE_TASK(next, "is not hp_waiter of replica %d. hp_waiter is %s/%d\n", | 1569 | TRACE_TASK(next, "is not hp_waiter of replica %d. hp_waiter is %s/%d\n", |
1570 | ikglp_get_idx(sem, fq), | 1570 | ikglp_get_idx(sem, fq), |
1571 | (fq->hp_waiter) ? fq->hp_waiter->comm : "nil", | 1571 | (fq->hp_waiter) ? fq->hp_waiter->comm : "null", |
1572 | (fq->hp_waiter) ? fq->hp_waiter->pid : -1); | 1572 | (fq->hp_waiter) ? fq->hp_waiter->pid : 0); |
1573 | 1573 | ||
1574 | raw_spin_lock(&tsk_rt(next)->hp_blocked_tasks_lock); | 1574 | raw_spin_lock(&tsk_rt(next)->hp_blocked_tasks_lock); |
1575 | 1575 | ||
@@ -2166,8 +2166,8 @@ out: | |||
2166 | 2166 | ||
2167 | TRACE_CUR("Candidate victim from fq %d is %s/%d. aff improvement = %d.\n", | 2167 | TRACE_CUR("Candidate victim from fq %d is %s/%d. aff improvement = %d.\n", |
2168 | replica, | 2168 | replica, |
2169 | (wait) ? wait->task->comm : "nil", | 2169 | (wait) ? wait->task->comm : "null", |
2170 | (wait) ? wait->task->pid : -1, | 2170 | (wait) ? wait->task->pid : 0, |
2171 | max_improvement); | 2171 | max_improvement); |
2172 | 2172 | ||
2173 | return wait; | 2173 | return wait; |
@@ -2284,11 +2284,11 @@ static ikglp_donee_heap_node_t* pick_donee(struct ikglp_affinity* aff, | |||
2284 | // "(mth_highest != fq->owner) = %d " | 2284 | // "(mth_highest != fq->owner) = %d " |
2285 | // "(mth_highest > fq->owner) = %d\n", | 2285 | // "(mth_highest > fq->owner) = %d\n", |
2286 | // ikglp_get_idx(sem, fq), | 2286 | // ikglp_get_idx(sem, fq), |
2287 | // (fq->owner) ? fq->owner->comm : "nil", | 2287 | // (fq->owner) ? fq->owner->comm : "null", |
2288 | // (fq->owner) ? fq->owner->pid : -1, | 2288 | // (fq->owner) ? fq->owner->pid : 0, |
2289 | // (fq->owner) ? (int)get_deadline(fq->owner) - now : -999, | 2289 | // (fq->owner) ? (int)get_deadline(fq->owner) - now : -999, |
2290 | // (fq->donee_heap_node.donor_info) ? fq->donee_heap_node.donor_info->task->comm : "nil", | 2290 | // (fq->donee_heap_node.donor_info) ? fq->donee_heap_node.donor_info->task->comm : "null", |
2291 | // (fq->donee_heap_node.donor_info) ? fq->donee_heap_node.donor_info->task->pid : -1, | 2291 | // (fq->donee_heap_node.donor_info) ? fq->donee_heap_node.donor_info->task->pid : 0, |
2292 | // (mth_highest != fq->owner), | 2292 | // (mth_highest != fq->owner), |
2293 | // (litmus->__compare(mth_highest, BASE, fq->owner, BASE))); | 2293 | // (litmus->__compare(mth_highest, BASE, fq->owner, BASE))); |
2294 | 2294 | ||
@@ -2308,8 +2308,8 @@ static ikglp_donee_heap_node_t* pick_donee(struct ikglp_affinity* aff, | |||
2308 | // dist_from_head, | 2308 | // dist_from_head, |
2309 | // wait->task->comm, wait->task->pid, | 2309 | // wait->task->comm, wait->task->pid, |
2310 | // (int)get_deadline(wait->task) - now, | 2310 | // (int)get_deadline(wait->task) - now, |
2311 | // (wait->donee_heap_node.donor_info) ? wait->donee_heap_node.donor_info->task->comm : "nil", | 2311 | // (wait->donee_heap_node.donor_info) ? wait->donee_heap_node.donor_info->task->comm : "null", |
2312 | // (wait->donee_heap_node.donor_info) ? wait->donee_heap_node.donor_info->task->pid : -1, | 2312 | // (wait->donee_heap_node.donor_info) ? wait->donee_heap_node.donor_info->task->pid : 0, |
2313 | // (mth_highest != wait->task), | 2313 | // (mth_highest != wait->task), |
2314 | // (litmus->__compare(mth_highest, BASE, wait->task, BASE))); | 2314 | // (litmus->__compare(mth_highest, BASE, wait->task, BASE))); |
2315 | 2315 | ||
@@ -2342,8 +2342,8 @@ out: | |||
2342 | 2342 | ||
2343 | TRACE_CUR("Candidate donee for fq %d is %s/%d (dist_from_head = %d)\n", | 2343 | TRACE_CUR("Candidate donee for fq %d is %s/%d (dist_from_head = %d)\n", |
2344 | ikglp_get_idx(sem, fq), | 2344 | ikglp_get_idx(sem, fq), |
2345 | (donee) ? (donee)->comm : "nil", | 2345 | (donee) ? (donee)->comm : "null", |
2346 | (donee) ? (donee)->pid : -1, | 2346 | (donee) ? (donee)->pid : 0, |
2347 | *dist_from_head); | 2347 | *dist_from_head); |
2348 | 2348 | ||
2349 | return donee_node; | 2349 | return donee_node; |