Changeset 5378f99 in mainline
- Timestamp:
- 2011-01-27T18:34:49Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2a827f4
- Parents:
- 577f042a
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
r577f042a r5378f99 338 338 * The caller box is different from sender->answerbox 339 339 * for synchronous calls. 340 *341 340 */ 342 341 answerbox_t *callerbox; … … 355 354 * cases, we must keep it aside so that the answer is processed 356 355 * correctly. 357 *358 356 */ 359 357 phone_t *caller_phone; -
kernel/generic/src/ipc/ipc.c
r577f042a r5378f99 690 690 irq_spinlock_exchange(&tasks_lock, &task->lock); 691 691 692 /* Print opened phones & details */ 693 printf("PHONE:\n"); 692 printf("[phone id] [calls] [state\n"); 694 693 695 694 size_t i; 696 695 for (i = 0; i < IPC_MAX_PHONES; i++) { 697 696 if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) { 698 printf("% zu: mutex busy\n", i);697 printf("%-10zu (mutex busy)\n", i); 699 698 continue; 700 699 } 701 700 702 701 if (task->phones[i].state != IPC_PHONE_FREE) { 703 printf("%zu: ", i); 702 printf("%-10zu %7" PRIun " ", i, 703 atomic_get(&task->phones[i].active_calls)); 704 704 705 705 switch (task->phones[i].state) { 706 706 case IPC_PHONE_CONNECTING: 707 printf("connecting 707 printf("connecting"); 708 708 break; 709 709 case IPC_PHONE_CONNECTED: 710 printf("connected to : %p (%" PRIu64 ")",711 task->phones[i].callee ,712 task->phones[i].callee->task-> taskid);710 printf("connected to %" PRIu64 " (%s)", 711 task->phones[i].callee->task->taskid, 712 task->phones[i].callee->task->name); 713 713 break; 714 714 case IPC_PHONE_SLAMMED: 715 printf("slammed by : %p ",715 printf("slammed by %p", 716 716 task->phones[i].callee); 717 717 break; 718 718 case IPC_PHONE_HUNGUP: 719 printf("hung up - was: %p ",719 printf("hung up by %p", 720 720 task->phones[i].callee); 721 721 break; … … 724 724 } 725 725 726 printf("active: %" PRIun "\n", 727 atomic_get(&task->phones[i].active_calls)); 726 printf("\n"); 728 727 } 729 728 … … 733 732 irq_spinlock_lock(&task->answerbox.lock, false); 734 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 735 744 link_t *cur; 736 745 737 /* Print answerbox - calls */ 738 printf("ABOX - CALLS:\n"); 746 printf(" --- incomming calls ---\n"); 739 747 for (cur = task->answerbox.calls.next; cur != &task->answerbox.calls; 740 748 cur = cur->next) { 741 749 call_t *call = list_get_instance(cur, call_t, link); 742 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun 743 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun 744 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call, 745 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", 746 761 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 747 762 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 748 763 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 749 call->flags); 750 } 751 752 /* Print answerbox - dispatched calls */ 753 printf("ABOX - DISPATCHED CALLS:\n"); 764 call->flags, call->sender->taskid, call->sender->name); 765 } 766 767 printf(" --- dispatched calls ---\n"); 754 768 for (cur = task->answerbox.dispatched_calls.next; 755 769 cur != &task->answerbox.dispatched_calls; 756 770 cur = cur->next) { 757 771 call_t *call = list_get_instance(cur, call_t, link); 758 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun 759 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun 760 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call, 761 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", 762 783 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 763 784 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 764 785 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 765 call->flags); 766 } 767 768 /* Print answerbox - answers */ 769 printf("ABOX - ANSWERS:\n"); 786 call->flags, call->sender->taskid, call->sender->name); 787 } 788 789 printf(" --- outgoing answers ---\n"); 770 790 for (cur = task->answerbox.answers.next; 771 791 cur != &task->answerbox.answers; 772 792 cur = cur->next) { 773 793 call_t *call = list_get_instance(cur, call_t, link); 774 printf("Callid:%p M:%" PRIun " A1:%" PRIun " A2:%" PRIun 775 " A3:%" PRIun " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", 776 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), 777 806 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 778 807 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 779 call->flags );808 call->flags, call->sender->taskid, call->sender->name); 780 809 } 781 810
Note:
See TracChangeset
for help on using the changeset viewer.