Changeset 119c335 in mainline


Ignore:
Timestamp:
2008-09-25T18:17:00Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e436cfe
Parents:
0993087
Message:

Add comments documenting our treatment of the task's active call counter.

Location:
kernel/generic/src/ipc
Files:
2 edited

Legend:

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

    r0993087 r119c335  
    509509
    510510        /* Free unused call */
    511         if (call) ipc_call_free(call);
     511        if (call)
     512                ipc_call_free(call);
    512513}
    513514
     
    574575                ASSERT(!(call->flags & IPC_CALL_STATIC_ALLOC));
    575576               
     577                /*
     578                 * Record the receipt of this call in the current task's counter
     579                 * of active calls. IPC_M_PHONE_HUNGUP calls do not contribute
     580                 * to this counter so do not record answers to them either.
     581                 */
    576582                if (!(call->flags & IPC_CALL_DISCARD_ANSWER))
    577583                        atomic_dec(&TASK->active_calls);
  • kernel/generic/src/ipc/sysipc.c

    r0993087 r119c335  
    823823                ASSERT(! (call->flags & IPC_CALL_STATIC_ALLOC));
    824824
    825                 if (!(call->flags & IPC_CALL_DISCARD_ANSWER))
    826                         atomic_dec(&TASK->active_calls);
    827 
    828825                if (call->flags & IPC_CALL_DISCARD_ANSWER) {
    829826                        ipc_call_free(call);
    830827                        goto restart;
     828                } else {
     829                        /*
     830                         * Decrement the counter of active calls only if the
     831                         * call is not an answer to IPC_M_PHONE_HUNGUP,
     832                         * which doesn't contribute to the counter.
     833                         */
     834                        atomic_dec(&TASK->active_calls);
    831835                }
    832836
Note: See TracChangeset for help on using the changeset viewer.