Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1cb75de in mainline


Ignore:
Timestamp:
2012-08-14T20:17:12Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
9956fad9
Parents:
86939b1
Message:

Remove an answered call from the task's active list when the call is
answered in _ipc_answer_free_call() rather than when the answer is
picked up by the sender task in ipc_wait_for_call().

This makes the maintainance of the active list symmetric because the
addition takes place in _ipc_call().

Moreover, unlike when tracking the phone's number of active calls, there
is no reason to postpone the removal from the active calls list until
ipc_wait_for_call().

File:
1 edited

Legend:

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

    r86939b1 r1cb75de  
    186186        }
    187187
     188        /*
     189         * Remove the call from the sender's active call list.
     190         */
     191        spinlock_lock(&call->sender->active_calls_lock);
     192        list_remove(&call->ta_link);
     193        spinlock_unlock(&call->sender->active_calls_lock);
     194
    188195        call->data.task_id = TASK->taskid;
    189196       
     
    429436                list_remove(&request->ab_link);
    430437                atomic_dec(&request->data.phone->active_calls);
    431 
    432                 /*
    433                  * Remove the call from this task's active call list.
    434                  */
    435                 spinlock_lock(&TASK->active_calls_lock);
    436                 list_remove(&request->ta_link);
    437                 spinlock_unlock(&TASK->active_calls_lock);
    438438        } else if (!list_empty(&box->calls)) {
    439439                /* Count received call */
Note: See TracChangeset for help on using the changeset viewer.