Changeset 2d22049 in mainline


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).

Location:
libc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/async.c

    rbf9afa07 r2d22049  
    508508                futex_up(&async_futex);
    509509
    510                 callid = ipc_wait_cycle(&call, timeout, SYNCH_BLOCKING);
     510                callid = ipc_wait_cycle(&call, timeout, SYNCH_FLAGS_NONE);
    511511
    512512                if (!callid) {
  • 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) {
  • libc/generic/ipc.c

    rbf9afa07 r2d22049  
    361361
    362362        do {
    363                 callid = ipc_wait_cycle(call, usec, SYNCH_BLOCKING);
     363                callid = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
    364364        } while (callid & IPC_CALLID_ANSWERED);
    365365
     
    378378
    379379        do {
    380                 callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT, SYNCH_NON_BLOCKING);
     380                callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NON_BLOCKING);
    381381        } while (callid & IPC_CALLID_ANSWERED);
    382382
  • libc/include/futex.h

    rbf9afa07 r2d22049  
    3838extern int futex_down(atomic_t *futex);
    3939extern int futex_trydown(atomic_t *futex);
    40 extern int futex_down_timeout(atomic_t *futex, uint32_t usec, int trydown);
     40extern int futex_down_timeout(atomic_t *futex, uint32_t usec, int flags);
    4141extern int futex_up(atomic_t *futex);
    4242
Note: See TracChangeset for help on using the changeset viewer.