Changeset 116d1ef4 in mainline for generic/src/ipc/ipc.c


Ignore:
Timestamp:
2006-06-02T12:26:50Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d0c5901
Parents:
01ebbdf
Message:

Replace nonblocking argument of waitq_sleep_timeout with flags that specify mode of operation.
Now a flag can be used to specify interruptible sleep.
Modify waitq_interrupt_sleep() to only interrupt threads that used this flag.
O

File:
1 edited

Legend:

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

    r01ebbdf r116d1ef4  
    143143
    144144        ipc_call(phone, request);
    145         ipc_wait_for_call(&sync_box, SYNCH_NO_TIMEOUT, SYNCH_BLOCKING);
     145        ipc_wait_for_call(&sync_box, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
    146146}
    147147
     
    306306 * @param usec Timeout in microseconds. See documentation for waitq_sleep_timeout() for
    307307 *             decription of its special meaning.
    308  * @param nonblocking Blocking vs. non-blocking operation mode switch. See documentation
    309  *                    for waitq_sleep_timeout() for description of its special meaning.
     308 * @param flags Select mode of sleep operation. See documentation for waitq_sleep_timeout()i
     309 *              for description of its special meaning.
    310310 * @return Recived message address
    311311 * - to distinguish between call and answer, look at call->flags
    312312 */
    313 call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int nonblocking)
     313call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags)
    314314{
    315315        call_t *request;
     
    318318
    319319restart:
    320         rc = waitq_sleep_timeout(&box->wq, usec, nonblocking);
     320        rc = waitq_sleep_timeout(&box->wq, usec, flags);
    321321        if (SYNCH_FAILED(rc))
    322322                return NULL;
     
    413413        /* Wait for all async answers to arrive */
    414414        while (atomic_get(&task->active_calls)) {
    415                 call = ipc_wait_for_call(&task->answerbox, SYNCH_NO_TIMEOUT, SYNCH_BLOCKING);
     415                call = ipc_wait_for_call(&task->answerbox, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
    416416                ASSERT((call->flags & IPC_CALL_ANSWERED) || (call->flags & IPC_CALL_NOTIF));
    417417                ASSERT(! (call->flags & IPC_CALL_STATIC_ALLOC));
Note: See TracChangeset for help on using the changeset viewer.