Changeset 9c9903a in mainline
- Timestamp:
- 2012-08-30T22:08:42Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4cd7fd0
- Parents:
- 5a77550
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r5a77550 r9c9903a 448 448 list_remove(&request->ab_link); 449 449 atomic_dec(&request->caller_phone->active_calls); 450 ASSERT(atomic_get(&request->caller_phone->active_calls) >= 0); 450 451 } else if (!list_empty(&box->calls)) { 451 452 /* Count received call */ … … 597 598 598 599 atomic_dec(&call->caller_phone->active_calls); 600 ASSERT(atomic_get(&call->caller_phone->active_calls) >= 0); 599 601 600 602 sysipc_ops_t *ops = sysipc_ops_get(call->request_method); … … 715 717 ipc_answerbox_slab = slab_cache_create("answerbox_t", 716 718 sizeof(answerbox_t), 0, NULL, NULL, 0); 719 } 720 721 722 static void ipc_print_call_list(list_t *list) 723 { 724 list_foreach(*list, cur) { 725 call_t *call = list_get_instance(cur, call_t, ab_link); 726 727 #ifdef __32_BITS__ 728 printf("%10p ", call); 729 #endif 730 731 #ifdef __64_BITS__ 732 printf("%18p ", call); 733 #endif 734 735 spinlock_lock(&call->forget_lock); 736 737 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 738 " %-6" PRIun " %-6" PRIun " %-7x", 739 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 740 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 741 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 742 call->flags); 743 744 if (call->forget) { 745 printf(" ? (call forgotten)\n"); 746 } else { 747 printf(" %" PRIu64 " (%s)\n", 748 call->sender->taskid, call->sender->name); 749 } 750 751 spinlock_unlock(&call->forget_lock); 752 } 717 753 } 718 754 … … 788 824 789 825 printf(" --- incomming calls ---\n"); 790 list_foreach(task->answerbox.calls, cur) { 791 call_t *call = list_get_instance(cur, call_t, ab_link); 792 793 #ifdef __32_BITS__ 794 printf("%10p ", call); 795 #endif 796 797 #ifdef __64_BITS__ 798 printf("%18p ", call); 799 #endif 800 801 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 802 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 803 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 804 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 805 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 806 call->flags, call->sender->taskid, call->sender->name); 807 } 808 826 ipc_print_call_list(&task->answerbox.calls); 809 827 printf(" --- dispatched calls ---\n"); 810 list_foreach(task->answerbox.dispatched_calls, cur) { 811 call_t *call = list_get_instance(cur, call_t, ab_link); 812 813 #ifdef __32_BITS__ 814 printf("%10p ", call); 815 #endif 816 817 #ifdef __64_BITS__ 818 printf("%18p ", call); 819 #endif 820 821 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 822 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 823 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 824 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 825 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 826 call->flags, call->sender->taskid, call->sender->name); 827 } 828 828 ipc_print_call_list(&task->answerbox.dispatched_calls); 829 829 printf(" --- incoming answers ---\n"); 830 list_foreach(task->answerbox.answers, cur) { 831 call_t *call = list_get_instance(cur, call_t, ab_link); 832 833 #ifdef __32_BITS__ 834 printf("%10p ", call); 835 #endif 836 837 #ifdef __64_BITS__ 838 printf("%18p ", call); 839 #endif 840 841 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 842 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 843 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 844 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 845 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 846 call->flags, call->sender->taskid, call->sender->name); 847 } 830 ipc_print_call_list(&task->answerbox.answers); 848 831 849 832 irq_spinlock_unlock(&task->answerbox.lock, false);
Note:
See TracChangeset
for help on using the changeset viewer.