Changes in kernel/generic/src/ipc/ipc.c [6aef742:228e490] in mainline
- File:
-
- 1 edited
-
kernel/generic/src/ipc/ipc.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r6aef742 r228e490 295 295 atomic_inc(&phone->active_calls); 296 296 call->data.phone = phone; 297 call->data.task = TASK;298 297 } 299 298 … … 407 406 call->caller_phone = call->data.phone; 408 407 call->data.phone = newphone; 409 call->data.task = TASK;410 408 } 411 409 … … 690 688 irq_spinlock_exchange(&tasks_lock, &task->lock); 691 689 692 printf("[phone id] [calls] [state\n"); 690 /* Print opened phones & details */ 691 printf("PHONE:\n"); 693 692 694 693 size_t i; 695 694 for (i = 0; i < IPC_MAX_PHONES; i++) { 696 695 if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) { 697 printf("% -10zu (mutex busy)\n", i);696 printf("%zu: mutex busy\n", i); 698 697 continue; 699 698 } 700 699 701 700 if (task->phones[i].state != IPC_PHONE_FREE) { 702 printf("%-10zu %7" PRIun " ", i, 703 atomic_get(&task->phones[i].active_calls)); 701 printf("%zu: ", i); 704 702 705 703 switch (task->phones[i].state) { 706 704 case IPC_PHONE_CONNECTING: 707 printf("connecting ");705 printf("connecting "); 708 706 break; 709 707 case IPC_PHONE_CONNECTED: 710 printf("connected to %" PRIu64 " (%s)", 711 task->phones[i].callee->task->taskid, 712 task->phones[i].callee->task->name); 708 printf("connected to: %p ", 709 task->phones[i].callee); 713 710 break; 714 711 case IPC_PHONE_SLAMMED: 715 printf("slammed by %p",712 printf("slammed by: %p ", 716 713 task->phones[i].callee); 717 714 break; 718 715 case IPC_PHONE_HUNGUP: 719 printf("hung up by %p",716 printf("hung up - was: %p ", 720 717 task->phones[i].callee); 721 718 break; … … 724 721 } 725 722 726 printf("\n"); 723 printf("active: %" PRIun "\n", 724 atomic_get(&task->phones[i].active_calls)); 727 725 } 728 726 … … 732 730 irq_spinlock_lock(&task->answerbox.lock, false); 733 731 734 #ifdef __32_BITS__735 printf("[call id ] [method] [arg1] [arg2] [arg3] [arg4] [arg5]"736 " [flags] [sender\n");737 #endif738 739 #ifdef __64_BITS__740 printf("[call id ] [method] [arg1] [arg2] [arg3] [arg4]"741 " [arg5] [flags] [sender\n");742 #endif743 744 732 link_t *cur; 745 733 746 printf(" --- incomming calls ---\n"); 734 /* Print answerbox - calls */ 735 printf("ABOX - CALLS:\n"); 747 736 for (cur = task->answerbox.calls.next; cur != &task->answerbox.calls; 748 737 cur = cur->next) { 749 738 call_t *call = list_get_instance(cur, call_t, link); 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", 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, 761 743 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 762 744 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 763 745 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 764 call->flags, call->sender->taskid, call->sender->name); 765 } 766 767 printf(" --- dispatched calls ---\n"); 746 call->flags); 747 } 748 749 /* Print answerbox - dispatched calls */ 750 printf("ABOX - DISPATCHED CALLS:\n"); 768 751 for (cur = task->answerbox.dispatched_calls.next; 769 752 cur != &task->answerbox.dispatched_calls; 770 753 cur = cur->next) { 771 754 call_t *call = list_get_instance(cur, call_t, link); 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", 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, 783 759 IPC_GET_IMETHOD(call->data), IPC_GET_ARG1(call->data), 784 760 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 785 761 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 786 call->flags, call->sender->taskid, call->sender->name); 787 } 788 789 printf(" --- incoming answers ---\n"); 762 call->flags); 763 } 764 765 /* Print answerbox - answers */ 766 printf("ABOX - ANSWERS:\n"); 790 767 for (cur = task->answerbox.answers.next; 791 768 cur != &task->answerbox.answers; 792 769 cur = cur->next) { 793 770 call_t *call = list_get_instance(cur, call_t, link); 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), 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), 806 774 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), 807 775 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data), 808 call->flags , call->sender->taskid, call->sender->name);776 call->flags); 809 777 } 810 778
Note:
See TracChangeset
for help on using the changeset viewer.
