Print this page
5042 stop using deprecated atomic functions
@@ -91,11 +91,11 @@
hrtime_t *addr = &it->it_hrtime;
hrtime_t old = *addr, new = gethrtime();
do {
old = *addr;
- } while (cas64((uint64_t *)addr, old, new) != old);
+ } while (atomic_cas_64((uint64_t *)addr, old, new) != old);
timer_fire(it);
}
static int
@@ -233,14 +233,14 @@
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.
+ * We're using atomic_cas_64() here only to assure that we slurp the
+ * entire timestamp atomically.
*/
- last = cas64((uint64_t *)addr, 0, 0);
+ last = atomic_cas_64((uint64_t *)addr, 0, 0);
*when = it->it_itime;
if (!timerspecisset(&when->it_value))
return (0);