Ignore:
File:
1 edited

Legend:

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

    r170332d rc713aa56  
    218218        answerbox_t *callerbox = call->callerbox;
    219219        bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox));
    220         ipl_t ipl;
    221 
    222         /* Count sent answer */
    223         ipl = interrupts_disable();
    224         spinlock_lock(&TASK->lock);
    225         TASK->ipc_info.answer_sent++;
    226         spinlock_unlock(&TASK->lock);
    227         interrupts_restore(ipl);
    228220
    229221        call->flags |= IPC_CALL_ANSWERED;
     
    284276static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call)
    285277{
    286         ipl_t ipl;
    287 
    288         /* Count sent ipc call */
    289         ipl = interrupts_disable();
    290         spinlock_lock(&TASK->lock);
    291         TASK->ipc_info.call_sent++;
    292         spinlock_unlock(&TASK->lock);
    293         interrupts_restore(ipl);
    294 
    295278        if (!(call->flags & IPC_CALL_FORWARDED)) {
    296279                atomic_inc(&phone->active_calls);
     
    393376int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode)
    394377{
    395         ipl_t ipl;
    396 
    397         /* Count forwarded calls */
    398         ipl = interrupts_disable();
    399         spinlock_lock(&TASK->lock);
    400         TASK->ipc_info.forwarded++;
    401         spinlock_unlock(&TASK->lock);
    402         interrupts_restore(ipl);
    403 
    404378        spinlock_lock(&oldbox->lock);
    405379        list_remove(&call->link);
     
    433407        call_t *request;
    434408        ipl_t ipl;
    435         uint64_t irq_cnt = 0;
    436         uint64_t answer_cnt = 0;
    437         uint64_t call_cnt = 0;
    438409        int rc;
    439410
     
    445416        spinlock_lock(&box->lock);
    446417        if (!list_empty(&box->irq_notifs)) {
    447                 /* Count recieved IRQ notification */
    448                 irq_cnt++;     
    449 
    450418                ipl = interrupts_disable();
    451419                spinlock_lock(&box->irq_lock);
     
    457425                interrupts_restore(ipl);
    458426        } else if (!list_empty(&box->answers)) {
    459                 /* Count recieved answer */
    460                 answer_cnt++;
    461 
    462427                /* Handle asynchronous answers */
    463428                request = list_get_instance(box->answers.next, call_t, link);
     
    465430                atomic_dec(&request->data.phone->active_calls);
    466431        } else if (!list_empty(&box->calls)) {
    467                 /* Count recieved call */
    468                 call_cnt++;
    469 
    470432                /* Handle requests */
    471433                request = list_get_instance(box->calls.next, call_t, link);
     
    479441        }
    480442        spinlock_unlock(&box->lock);
    481        
    482         ipl = interrupts_disable();
    483         spinlock_lock(&TASK->lock);
    484         TASK->ipc_info.irq_notif_recieved += irq_cnt;
    485         TASK->ipc_info.answer_recieved += answer_cnt;
    486         TASK->ipc_info.call_recieved += call_cnt;
    487         spinlock_unlock(&TASK->lock);
    488         interrupts_restore(ipl);
    489 
    490443        return request;
    491444}
     
    691644        call_t *call;
    692645        link_t *tmp;
    693         ipl_t ipl;
    694646       
    695         ipl = interrupts_disable();
    696647        spinlock_lock(&tasks_lock);
    697648        task = task_find_by_id(taskid);
     
    699650                spinlock_lock(&task->lock);
    700651        spinlock_unlock(&tasks_lock);
    701         if (!task) {
    702                 interrupts_restore(ipl);
     652        if (!task)
    703653                return;
    704         }
    705654
    706655        /* Print opened phones & details */
     
    785734        spinlock_unlock(&task->answerbox.lock);
    786735        spinlock_unlock(&task->lock);
    787         interrupts_restore(ipl);
    788736}
    789737
Note: See TracChangeset for help on using the changeset viewer.