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


Ignore:
Timestamp:
2018-03-13T18:01:47Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bde48fa
Parents:
e618885
git-author:
Jakub Jermar <jakub@…> (2018-03-04 12:00:48)
git-committer:
Jakub Jermar <jakub@…> (2018-03-13 18:01:47)
Message:

Streamline code

File:
1 edited

Legend:

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

    re618885 rca61894  
    756756static void ipc_wait_for_all_answered_calls(void)
    757757{
    758         call_t *call;
    759 
    760 restart:
    761         if (atomic_get(&TASK->answerbox.active_calls) == 0) {
    762                 /* Got into cleanup */
    763                 return;
    764         }
    765 
    766         call = ipc_wait_for_call(&TASK->answerbox, SYNCH_NO_TIMEOUT,
    767             SYNCH_FLAGS_NONE);
    768         assert(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
    769 
    770         SYSIPC_OP(answer_process, call);
    771 
    772         kobject_put(call->kobject);
    773         goto restart;
     758        while (atomic_get(&TASK->answerbox.active_calls) != 0) {
     759                call_t *call = ipc_wait_for_call(&TASK->answerbox,
     760                    SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
     761                assert(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
     762
     763                SYSIPC_OP(answer_process, call);
     764
     765                kobject_put(call->kobject);
     766        }
    774767}
    775768
Note: See TracChangeset for help on using the changeset viewer.