Changes in kernel/generic/src/ipc/ipc.c [55b77d9:6aef742] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r55b77d9 r6aef742 44 44 #include <synch/synch.h> 45 45 #include <ipc/ipc.h> 46 #include <ipc/ipc_methods.h>47 46 #include <ipc/kbox.h> 48 47 #include <ipc/event.h> … … 128 127 list_initialize(&box->answers); 129 128 list_initialize(&box->irq_notifs); 130 list_initialize(&box->irq_ list);129 list_initialize(&box->irq_head); 131 130 box->task = task; 132 131 } … … 183 182 */ 184 183 irq_spinlock_lock(&TASK->lock, true); 185 list_append(&sync_box->sync_box_link, &TASK->sync_box es);184 list_append(&sync_box->sync_box_link, &TASK->sync_box_head); 186 185 irq_spinlock_unlock(&TASK->lock, true); 187 186 … … 450 449 irq_spinlock_lock(&box->irq_lock, false); 451 450 452 request = list_get_instance(list_first(&box->irq_notifs), 453 call_t, link); 451 request = list_get_instance(box->irq_notifs.next, call_t, link); 454 452 list_remove(&request->link); 455 453 … … 460 458 461 459 /* Handle asynchronous answers */ 462 request = list_get_instance(list_first(&box->answers), 463 call_t, link); 460 request = list_get_instance(box->answers.next, call_t, link); 464 461 list_remove(&request->link); 465 462 atomic_dec(&request->data.phone->active_calls); … … 469 466 470 467 /* Handle requests */ 471 request = list_get_instance(list_first(&box->calls), 472 call_t, link); 468 request = list_get_instance(box->calls.next, call_t, link); 473 469 list_remove(&request->link); 474 470 … … 497 493 * 498 494 */ 499 void ipc_cleanup_call_list(li st_t *lst)495 void ipc_cleanup_call_list(link_t *lst) 500 496 { 501 497 while (!list_empty(lst)) { 502 call_t *call = list_get_instance(l ist_first(lst), call_t, link);498 call_t *call = list_get_instance(lst->next, call_t, link); 503 499 if (call->buffer) 504 500 free(call->buffer); … … 529 525 irq_spinlock_lock(&box->lock, true); 530 526 while (!list_empty(&box->connected_phones)) { 531 phone = list_get_instance( list_first(&box->connected_phones),527 phone = list_get_instance(box->connected_phones.next, 532 528 phone_t, link); 533 529 if (SYNCH_FAILED(mutex_trylock(&phone->lock))) { … … 609 605 /* Wait for all answers to interrupted synchronous calls to arrive */ 610 606 ipl_t ipl = interrupts_disable(); 611 while (!list_empty(&TASK->sync_box es)) {612 answerbox_t *box = list_get_instance( 613 list_first(&TASK->sync_boxes),answerbox_t, sync_box_link);607 while (!list_empty(&TASK->sync_box_head)) { 608 answerbox_t *box = list_get_instance(TASK->sync_box_head.next, 609 answerbox_t, sync_box_link); 614 610 615 611 list_remove(&box->sync_box_link); … … 746 742 #endif 747 743 744 link_t *cur; 745 748 746 printf(" --- incomming calls ---\n"); 749 list_foreach(task->answerbox.calls, cur) { 747 for (cur = task->answerbox.calls.next; cur != &task->answerbox.calls; 748 cur = cur->next) { 750 749 call_t *call = list_get_instance(cur, call_t, link); 751 750 … … 767 766 768 767 printf(" --- dispatched calls ---\n"); 769 list_foreach(task->answerbox.dispatched_calls, cur) { 768 for (cur = task->answerbox.dispatched_calls.next; 769 cur != &task->answerbox.dispatched_calls; 770 cur = cur->next) { 770 771 call_t *call = list_get_instance(cur, call_t, link); 771 772 … … 787 788 788 789 printf(" --- incoming answers ---\n"); 789 list_foreach(task->answerbox.answers, cur) { 790 for (cur = task->answerbox.answers.next; 791 cur != &task->answerbox.answers; 792 cur = cur->next) { 790 793 call_t *call = list_get_instance(cur, call_t, link); 791 794
Note:
See TracChangeset
for help on using the changeset viewer.