Changeset 116d1ef4 in mainline for generic/src/synch/condvar.c


Ignore:
Timestamp:
2006-06-02T12:26:50Z (18 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/synch/condvar.c

    r01ebbdf r116d1ef4  
    7575 * @param mtx Mutex.
    7676 * @param usec Timeout value in microseconds.
     77 * @param flags Select mode of operation.
    7778 *
    78  * For exact description of meaning of possible values of usec,
    79  * see comment for waitq_sleep_timeout().
     79 * For exact description of meaning of possible combinations
     80 * of usec and flags, see comment for waitq_sleep_timeout().
     81 * Note that when SYNCH_FLAGS_NON_BLOCKING is specified here,
     82 * ESYNCH_WOULD_BLOCK is always returned.
    8083 *
    8184 * @return See comment for waitq_sleep_timeout().
    8285 */
    83 int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec)
     86int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int flags)
    8487{
    8588        int rc;
     
    9093
    9194        cv->wq.missed_wakeups = 0;      /* Enforce blocking. */
    92         rc = waitq_sleep_timeout_unsafe(&cv->wq, usec, SYNCH_BLOCKING);
     95        rc = waitq_sleep_timeout_unsafe(&cv->wq, usec, flags);
    9396
    9497        mutex_lock(mtx);
Note: See TracChangeset for help on using the changeset viewer.