Changeset df1cbb3 in mainline


Ignore:
Timestamp:
2018-03-13T18:01:47Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
314f4b59
Parents:
9fc776c7
git-author:
Jakub Jermar <jakub@…> (2017-12-28 22:28:32)
git-committer:
Jakub Jermar <jakub@…> (2018-03-13 18:01:47)
Message:

Give reference to phone for each active call

This effectively removes the remains of the lazy phone recycling
mechanism used until the previous commit. Hungup phones are now
destroyed when their last active call is answered (and their reference
count goes to zero).

File:
1 edited

Legend:

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

    r9fc776c7 rdf1cbb3  
    350350        } else {
    351351                atomic_inc(&phone->active_calls);
     352                kobject_add_ref(phone->kobject);
    352353                call->sender = caller;
    353354                call->active = true;
     
    563564                list_remove(&request->ab_link);
    564565                atomic_dec(&request->caller_phone->active_calls);
     566                kobject_put(request->caller_phone->kobject);
    565567        } else if (!list_empty(&box->calls)) {
    566568                /* Count received call */
     
    707709
    708710        atomic_dec(&call->caller_phone->active_calls);
     711        kobject_put(call->caller_phone->kobject);
    709712
    710713        SYSIPC_OP(request_forget, call);
Note: See TracChangeset for help on using the changeset viewer.