Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/private/futex.h

    r205f1add rf787c8e  
    102102 *
    103103 */
    104 static inline errno_t futex_down_composable(futex_t *futex,
    105     const struct timespec *expires)
     104static inline errno_t futex_down_composable(futex_t *futex, const struct timeval *expires)
    106105{
    107106        // TODO: Add tests for this.
     
    110109                return EOK;
    111110
    112         usec_t timeout;
     111        suseconds_t timeout;
    113112
    114113        if (!expires) {
     
    120119                        timeout = 1;
    121120                } else {
    122                         struct timespec tv;
     121                        struct timeval tv;
    123122                        getuptime(&tv);
    124                         timeout = ts_gteq(&tv, expires) ? 1 :
    125                             NSEC2USEC(ts_sub_diff(expires, &tv));
     123                        timeout = tv_gteq(&tv, expires) ? 1 :
     124                            tv_sub_diff(expires, &tv);
    126125                }
    127126
     
    149148}
    150149
    151 static inline errno_t futex_down_timeout(futex_t *futex,
    152     const struct timespec *expires)
    153 {
    154         if (expires && expires->tv_sec == 0 && expires->tv_nsec == 0) {
     150static inline errno_t futex_down_timeout(futex_t *futex, const struct timeval *expires)
     151{
     152        if (expires && expires->tv_sec == 0 && expires->tv_usec == 0) {
    155153                /* Nonblocking down. */
    156154
     
    211209         * trydown.
    212210         */
    213         struct timespec tv = { .tv_sec = 0, .tv_nsec = 0 };
     211        struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
    214212        return futex_down_timeout(futex, &tv) == EOK;
    215213}
Note: See TracChangeset for help on using the changeset viewer.