Ignore:
File:
1 edited

Legend:

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

    rc713aa56 re701eb1  
    212212 *
    213213 * @param call          Call structure to be answered.
    214  * @param selflocked    If true, then TASK->answebox is locked.
    215  */
    216 static void _ipc_answer_free_call(call_t *call, bool selflocked)
     214 */
     215static void _ipc_answer_free_call(call_t *call)
    217216{
    218217        answerbox_t *callerbox = call->callerbox;
    219         bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox));
    220218
    221219        call->flags |= IPC_CALL_ANSWERED;
     
    228226        }
    229227
    230         if (do_lock)
    231                 spinlock_lock(&callerbox->lock);
     228        spinlock_lock(&callerbox->lock);
    232229        list_append(&call->link, &callerbox->answers);
    233         if (do_lock)
    234                 spinlock_unlock(&callerbox->lock);
     230        spinlock_unlock(&callerbox->lock);
    235231        waitq_wakeup(&callerbox->wq, WAKEUP_FIRST);
    236232}
     
    248244        spinlock_unlock(&box->lock);
    249245        /* Send back answer */
    250         _ipc_answer_free_call(call, false);
     246        _ipc_answer_free_call(call);
    251247}
    252248
     
    265261        atomic_inc(&phone->active_calls);
    266262        IPC_SET_RETVAL(call->data, err);
    267         _ipc_answer_free_call(call, false);
     263        _ipc_answer_free_call(call);
    268264}
    269265
     
    304300                if (call->flags & IPC_CALL_FORWARDED) {
    305301                        IPC_SET_RETVAL(call->data, EFORWARD);
    306                         _ipc_answer_free_call(call, false);
     302                        _ipc_answer_free_call(call);
    307303                } else {
    308304                        if (phone->state == IPC_PHONE_HUNGUP)
     
    459455
    460456                IPC_SET_RETVAL(call->data, EHANGUP);
    461                 _ipc_answer_free_call(call, true);
     457                _ipc_answer_free_call(call);
    462458        }
    463459}
Note: See TracChangeset for help on using the changeset viewer.