Changeset b9a2725 in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2018-11-09T22:03:24Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c222816
Parents:
c0ea739
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 20:54:46)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Allocate call for ipc_phone_hangup() ahead of time

File:
1 edited

Legend:

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

    rc0ea739 rb9a2725  
    116116call_t *ipc_call_alloc(unsigned int flags)
    117117{
     118        // TODO: Allocate call and kobject in single allocation
     119
    118120        call_t *call = slab_alloc(call_cache, flags);
    119121        if (!call)
     
    483485                kobject_put(phone->kobject);
    484486
    485                 call_t *call = ipc_call_alloc(0);
     487                call_t *call = phone->hangup_call;
     488                phone->hangup_call = NULL;
     489                assert(call);
     490
    486491                IPC_SET_IMETHOD(call->data, IPC_M_PHONE_HUNGUP);
    487492                call->request_method = IPC_M_PHONE_HUNGUP;
     
    685690                         * to exist as soon as we release it.
    686691                         */
    687                         call_t *call = ipc_call_alloc(0);
     692                        call_t *call = phone->hangup_call;
     693                        phone->hangup_call = NULL;
     694                        assert(call);
     695
    688696                        IPC_SET_IMETHOD(call->data, IPC_M_PHONE_HUNGUP);
    689697                        call->request_method = IPC_M_PHONE_HUNGUP;
Note: See TracChangeset for help on using the changeset viewer.