Changeset ad7a6c9 in mainline for kernel/generic/src/ipc/ipc.c
- Timestamp:
- 2011-03-30T13:10:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ae90f9
- Parents:
- 6e50466 (diff), d6b81941 (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
r6e50466 rad7a6c9 295 295 atomic_inc(&phone->active_calls); 296 296 call->data.phone = phone; 297 call->data.task = TASK; 297 298 } 298 299 … … 406 407 call->caller_phone = call->data.phone; 407 408 call->data.phone = newphone; 409 call->data.task = TASK; 408 410 } 409 411 … … 688 690 irq_spinlock_exchange(&tasks_lock, &task->lock); 689 691 690 /* Print opened phones & details */ 691 printf("PHONE:\n"); 692 printf("[phone id] [calls] [state\n"); 692 693 693 694 size_t i; 694 695 for (i = 0; i < IPC_MAX_PHONES; i++) { 695 696 if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) { 696 printf("% zu: mutex busy\n", i);697 printf("%-10zu (mutex busy)\n", i); 697 698 continue; 698 699 } 699 700 700 701 if (task->phones[i].state != IPC_PHONE_FREE) { 701 printf("%zu: ", i); 702 printf("%-10zu %7" PRIun " ", i, 703 atomic_get(&task->phones[i].active_calls)); 702 704 703 705 switch (task->phones[i].state) { 704 706 case IPC_PHONE_CONNECTING: 705 printf("connecting 707 printf("connecting"); 706 708 break; 707 709 case IPC_PHONE_CONNECTED: 708 printf("connected to: %p ", 709 task->phones[i].callee); 710 printf("connected to %" PRIu64 " (%s)", 711 task->phones[i].callee->task->taskid, 712 task->phones[i].callee->task->name); 710 713 break; 711 714 case IPC_PHONE_SLAMMED: 712 printf("slammed by : %p ",715 printf("slammed by %p", 713 716 task->phones[i].callee); 714 717 break; 715 718 case IPC_PHONE_HUNGUP: 716 printf("hung up - was: %p ",719 printf("hung up by %p", 717 720 task->phones[i].callee); 718 721 break; … … 721 724 } 722 725 723 printf("active: %" PRIun "\n", 724 atomic_get(&task->phones[i].active_calls)); 726 printf("\n"); 725 727 } 726 728 … … 730 732 irq_spinlock_lock(&task->answerbox.lock, false); 731 733 734 #ifdef __32_BITS__ 735 printf("[call id ] [method] [arg1] [arg2] [arg3] [arg4] [arg5]" 736 " [flags] [sender\n"); 737 #endif 738 739 #ifdef __64_BITS__ 740 printf("[call id ] [method] [arg1] [arg2] [arg3] [arg4]" 741 " [arg5] [flags] [sender\n"); 742 #endif 743 732 744 link_t *cur; 733 745 734 /* Print answerbox - calls */ 735 printf("ABOX - CALLS:\n"); 746 printf(" --- incomming calls ---\n"); 736 747 for (cur = task->answerbox.calls.next; cur != &task->answerbox.calls; 737 748 cur = cur->next) { 738 749 call_t *call = list_get_instance(cur, call_t, link); 739 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun 740 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun 741 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call, 742 call->sender->taskid, 750 751 #ifdef __32_BITS__ 752 printf("%10p ", call); 753 #endif 754 755 #ifdef __64_BITS__ 756 printf("%18p ", call); 757 #endif 758 759 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 760 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 743 761 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 744 762 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 745 763 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 746 call->flags); 747 } 748 749 /* Print answerbox - dispatched calls */ 750 printf("ABOX - DISPATCHED CALLS:\n"); 764 call->flags, call->sender->taskid, call->sender->name); 765 } 766 767 printf(" --- dispatched calls ---\n"); 751 768 for (cur = task->answerbox.dispatched_calls.next; 752 769 cur != &task->answerbox.dispatched_calls; 753 770 cur = cur->next) { 754 771 call_t *call = list_get_instance(cur, call_t, link); 755 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun 756 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun 757 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call, 758 call->sender->taskid, 772 773 #ifdef __32_BITS__ 774 printf("%10p ", call); 775 #endif 776 777 #ifdef __64_BITS__ 778 printf("%18p ", call); 779 #endif 780 781 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 782 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 759 783 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 760 784 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 761 785 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 762 call->flags); 763 } 764 765 /* Print answerbox - answers */ 766 printf("ABOX - ANSWERS:\n"); 786 call->flags, call->sender->taskid, call->sender->name); 787 } 788 789 printf(" --- incoming answers ---\n"); 767 790 for (cur = task->answerbox.answers.next; 768 791 cur != &task->answerbox.answers; 769 792 cur = cur->next) { 770 793 call_t *call = list_get_instance(cur, call_t, link); 771 printf("Callid:%p M:%" PRIun " A1:%" PRIun " A2:%" PRIun 772 " A3:%" PRIun " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", 773 call, IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 794 795 #ifdef __32_BITS__ 796 printf("%10p ", call); 797 #endif 798 799 #ifdef __64_BITS__ 800 printf("%18p ", call); 801 #endif 802 803 printf("%-8" PRIun " %-6" PRIun " %-6" PRIun " %-6" PRIun 804 " %-6" PRIun " %-6" PRIun " %-7x %" PRIu64 " (%s)\n", 805 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 774 806 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 775 807 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 776 call->flags );808 call->flags, call->sender->taskid, call->sender->name); 777 809 } 778 810
Note:
See TracChangeset
for help on using the changeset viewer.