Changeset cac458f in mainline for kernel/generic/src/ipc/ipc.c
- Timestamp:
- 2011-06-22T01:59:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 41e2118
- Parents:
- 79506d6 (diff), f1fae414 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r79506d6 rcac458f 128 128 list_initialize(&box->answers); 129 129 list_initialize(&box->irq_notifs); 130 list_initialize(&box->irq_ head);130 list_initialize(&box->irq_list); 131 131 box->task = task; 132 132 } … … 183 183 */ 184 184 irq_spinlock_lock(&TASK->lock, true); 185 list_append(&sync_box->sync_box_link, &TASK->sync_box _head);185 list_append(&sync_box->sync_box_link, &TASK->sync_boxes); 186 186 irq_spinlock_unlock(&TASK->lock, true); 187 187 … … 450 450 irq_spinlock_lock(&box->irq_lock, false); 451 451 452 request = list_get_instance(box->irq_notifs.next, call_t, link); 452 request = list_get_instance(list_first(&box->irq_notifs), 453 call_t, link); 453 454 list_remove(&request->link); 454 455 … … 459 460 460 461 /* Handle asynchronous answers */ 461 request = list_get_instance(box->answers.next, call_t, link); 462 request = list_get_instance(list_first(&box->answers), 463 call_t, link); 462 464 list_remove(&request->link); 463 465 atomic_dec(&request->data.phone->active_calls); … … 467 469 468 470 /* Handle requests */ 469 request = list_get_instance(box->calls.next, call_t, link); 471 request = list_get_instance(list_first(&box->calls), 472 call_t, link); 470 473 list_remove(&request->link); 471 474 … … 494 497 * 495 498 */ 496 void ipc_cleanup_call_list(li nk_t *lst)499 void ipc_cleanup_call_list(list_t *lst) 497 500 { 498 501 while (!list_empty(lst)) { 499 call_t *call = list_get_instance(l st->next, call_t, link);502 call_t *call = list_get_instance(list_first(lst), call_t, link); 500 503 if (call->buffer) 501 504 free(call->buffer); … … 526 529 irq_spinlock_lock(&box->lock, true); 527 530 while (!list_empty(&box->connected_phones)) { 528 phone = list_get_instance( box->connected_phones.next,531 phone = list_get_instance(list_first(&box->connected_phones), 529 532 phone_t, link); 530 533 if (SYNCH_FAILED(mutex_trylock(&phone->lock))) { … … 606 609 /* Wait for all answers to interrupted synchronous calls to arrive */ 607 610 ipl_t ipl = interrupts_disable(); 608 while (!list_empty(&TASK->sync_box _head)) {609 answerbox_t *box = list_get_instance( TASK->sync_box_head.next,610 answerbox_t, sync_box_link);611 while (!list_empty(&TASK->sync_boxes)) { 612 answerbox_t *box = list_get_instance( 613 list_first(&TASK->sync_boxes), answerbox_t, sync_box_link); 611 614 612 615 list_remove(&box->sync_box_link); … … 743 746 #endif 744 747 745 link_t *cur;746 747 748 printf(" --- incomming calls ---\n"); 748 for (cur = task->answerbox.calls.next; cur != &task->answerbox.calls; 749 cur = cur->next) { 749 list_foreach(task->answerbox.calls, cur) { 750 750 call_t *call = list_get_instance(cur, call_t, link); 751 751 … … 767 767 768 768 printf(" --- dispatched calls ---\n"); 769 for (cur = task->answerbox.dispatched_calls.next; 770 cur != &task->answerbox.dispatched_calls; 771 cur = cur->next) { 769 list_foreach(task->answerbox.dispatched_calls, cur) { 772 770 call_t *call = list_get_instance(cur, call_t, link); 773 771 … … 789 787 790 788 printf(" --- incoming answers ---\n"); 791 for (cur = task->answerbox.answers.next; 792 cur != &task->answerbox.answers; 793 cur = cur->next) { 789 list_foreach(task->answerbox.answers, cur) { 794 790 call_t *call = list_get_instance(cur, call_t, link); 795 791
Note:
See TracChangeset
for help on using the changeset viewer.