Changeset 79872cd in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2008-08-27T21:01:22Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69145dae
Parents:
ddb0df5
Message:

Synchronous IPC must be interruptible.

File:
1 edited

Legend:

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

    rddb0df5 r79872cd  
    172172 * @param phone         Destination kernel phone structure.
    173173 * @param request       Call structure with request.
    174  */
    175 void ipc_call_sync(phone_t *phone, call_t *request)
     174 *
     175 * @return              EOK on success or EINTR if the sleep was interrupted.
     176 */
     177int ipc_call_sync(phone_t *phone, call_t *request)
    176178{
    177179        answerbox_t sync_box;
     
    183185
    184186        ipc_call(phone, request);
    185         ipc_wait_for_call(&sync_box, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
     187        if (!ipc_wait_for_call(&sync_box, SYNCH_NO_TIMEOUT,
     188            SYNCH_FLAGS_INTERRUPTIBLE))
     189                return EINTR;
     190        return EOK;
    186191}
    187192
Note: See TracChangeset for help on using the changeset viewer.