Changeset 2d22049 in mainline for libc/generic/futex.c


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

Sync with last kernel commit (the ability to specify whether a sleep is interruptible or not).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/futex.c

    rbf9afa07 r2d22049  
    8282int futex_down(atomic_t *futex)
    8383{
    84         return futex_down_timeout(futex, SYNCH_NO_TIMEOUT, SYNCH_BLOCKING);
     84        return futex_down_timeout(futex, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
    8585}
    8686
    8787int futex_trydown(atomic_t *futex)
    8888{
    89         return futex_down_timeout(futex, SYNCH_NO_TIMEOUT, SYNCH_NON_BLOCKING);
     89        return futex_down_timeout(futex, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NON_BLOCKING);
    9090}
    9191
     
    9494 * @param futex Futex.
    9595 * @param usec Microseconds to wait. Zero value means sleep without timeout.
    96  * @param trydown If usec is zero and trydown is non-zero, only conditional
     96 * @param flags Select mode of operation. See comment for waitq_sleep_timeout().
    9797 *
    9898 * @return ENOENT if there is no such virtual address. One of ESYNCH_OK_ATOMIC
     
    101101 *         operation could not be carried out atomically (if requested so).
    102102 */
    103 int futex_down_timeout(atomic_t *futex, uint32_t usec, int trydown)
     103int futex_down_timeout(atomic_t *futex, uint32_t usec, int flags)
    104104{
    105105        int rc;
    106106       
    107107        while (atomic_predec(futex) < 0) {
    108                 rc = __SYSCALL3(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count, (sysarg_t) usec, (sysarg_t) trydown);
     108                rc = __SYSCALL3(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count, (sysarg_t) usec, (sysarg_t) flags);
    109109               
    110110                switch (rc) {
Note: See TracChangeset for help on using the changeset viewer.