Changeset 116d1ef4 in mainline for generic/src/synch/futex.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/futex.c

    r01ebbdf r116d1ef4  
    100100 * @param uaddr Userspace address of the futex counter.
    101101 * @param usec If non-zero, number of microseconds this thread is willing to sleep.
    102  * @param trydown If usec is zero and trydown is non-zero, conditional operation will be attempted.
     102 * @param flags Select mode of operation.
    103103 *
    104104 * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See synch.h.
    105105 *         If there is no physical mapping for uaddr ENOENT is returned.
    106106 */
    107 __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int trydown)
     107__native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags)
    108108{
    109109        futex_t *futex;
     
    131131        futex = futex_find(paddr);
    132132       
    133         return (__native) waitq_sleep_timeout(&futex->wq, usec, trydown);
     133        return (__native) waitq_sleep_timeout(&futex->wq, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE);
    134134}
    135135
Note: See TracChangeset for help on using the changeset viewer.