Print this page
5042 stop using deprecated atomic functions

*** 91,101 **** hrtime_t *addr = &it->it_hrtime; hrtime_t old = *addr, new = gethrtime(); do { old = *addr; ! } while (cas64((uint64_t *)addr, old, new) != old); timer_fire(it); } static int --- 91,101 ---- hrtime_t *addr = &it->it_hrtime; hrtime_t old = *addr, new = gethrtime(); do { old = *addr; ! } while (atomic_cas_64((uint64_t *)addr, old, new) != old); timer_fire(it); } static int
*** 233,246 **** hrtime_t diff, now = gethrtime(); hrtime_t *addr = &it->it_hrtime; hrtime_t last; /* ! * We're using cas64() here only to assure that we slurp the entire ! * timestamp atomically. */ ! last = cas64((uint64_t *)addr, 0, 0); *when = it->it_itime; if (!timerspecisset(&when->it_value)) return (0); --- 233,246 ---- hrtime_t diff, now = gethrtime(); hrtime_t *addr = &it->it_hrtime; hrtime_t last; /* ! * We're using atomic_cas_64() here only to assure that we slurp the ! * entire timestamp atomically. */ ! last = atomic_cas_64((uint64_t *)addr, 0, 0); *when = it->it_itime; if (!timerspecisset(&when->it_value)) return (0);