Changeset acf6b55 in mainline for kernel/generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2018-07-05T16:20:43Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
058c240
Parents:
bd9e868
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-04 23:32:32)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-05 16:20:43)
Message:

Make it possible for uspace to determine why SYS_IPC_WAIT returned.

File:
1 edited

Legend:

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

    rbd9e868 racf6b55  
    751751    unsigned int flags)
    752752{
    753         call_t *call;
     753        call_t *call = NULL;
    754754
    755755restart:
     
    759759#endif
    760760
    761         call = ipc_wait_for_call(&TASK->answerbox, usec,
    762             flags | SYNCH_FLAGS_INTERRUPTIBLE);
     761        errno_t rc = ipc_wait_for_call(&TASK->answerbox, usec,
     762            flags | SYNCH_FLAGS_INTERRUPTIBLE, &call);
    763763
    764764#ifdef CONFIG_UDEBUG
     
    766766#endif
    767767
    768         if (!call) {
    769                 ipc_data_t data = { };
    770                 data.cap_handle = CAP_NIL;
    771                 STRUCT_TO_USPACE(calldata, &data);
    772                 return EOK;
    773         }
     768        if (rc != EOK)
     769                return rc;
     770
     771        assert(call);
    774772
    775773        call->data.flags = call->flags;
     
    806804
    807805        cap_handle_t handle = CAP_NIL;
    808         errno_t rc = cap_alloc(TASK, &handle);
     806        rc = cap_alloc(TASK, &handle);
    809807        if (rc != EOK) {
    810808                goto error;
Note: See TracChangeset for help on using the changeset viewer.