Changeset 88dea9d in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2010-04-17T16:28:49Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30a5470
Parents:
5ba201d (diff), 95319bd (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.
Message:

merge from measuring branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipc.c

    r5ba201d r88dea9d  
    219219        bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox));
    220220
     221        /* Count sent answer */
     222        spinlock_lock(&TASK->lock);
     223        TASK->ipc_info.answer_sent++;
     224        spinlock_unlock(&TASK->lock);
     225
    221226        call->flags |= IPC_CALL_ANSWERED;
    222227
     
    276281static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call)
    277282{
     283        /* Count sent ipc call */
     284        spinlock_lock(&TASK->lock);
     285        TASK->ipc_info.call_sent++;
     286        spinlock_unlock(&TASK->lock);
     287
    278288        if (!(call->flags & IPC_CALL_FORWARDED)) {
    279289                atomic_inc(&phone->active_calls);
     
    376386int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode)
    377387{
     388        /* Count forwarded calls */
     389        spinlock_lock(&TASK->lock);
     390        TASK->ipc_info.forwarded++;
     391        spinlock_unlock(&TASK->lock);
     392
    378393        spinlock_lock(&oldbox->lock);
    379394        list_remove(&call->link);
     
    416431        spinlock_lock(&box->lock);
    417432        if (!list_empty(&box->irq_notifs)) {
     433
     434                /* Count recieved IRQ notification */
     435                spinlock_lock(&TASK->lock);
     436                TASK->ipc_info.irq_notif_recieved++;
     437                spinlock_unlock(&TASK->lock);
     438
    418439                ipl = interrupts_disable();
    419440                spinlock_lock(&box->irq_lock);
     
    425446                interrupts_restore(ipl);
    426447        } else if (!list_empty(&box->answers)) {
     448                /* Count recieved answer */
     449                spinlock_lock(&TASK->lock);
     450                TASK->ipc_info.answer_recieved++;
     451                spinlock_unlock(&TASK->lock);
     452
    427453                /* Handle asynchronous answers */
    428454                request = list_get_instance(box->answers.next, call_t, link);
     
    430456                atomic_dec(&request->data.phone->active_calls);
    431457        } else if (!list_empty(&box->calls)) {
     458                /* Count recieved call */
     459                spinlock_lock(&TASK->lock);
     460                TASK->ipc_info.call_recieved++;
     461                spinlock_unlock(&TASK->lock);
     462
    432463                /* Handle requests */
    433464                request = list_get_instance(box->calls.next, call_t, link);
Note: See TracChangeset for help on using the changeset viewer.