Print this page
5042 stop using deprecated atomic functions
@@ -656,11 +656,12 @@
for (ndx = orig = cyclic_coverage_hash(why) % CY_NCOVERAGE; ; ) {
if (cyc_coverage[ndx].cyv_why == why)
break;
if (cyc_coverage[ndx].cyv_why != NULL ||
- casptr(&cyc_coverage[ndx].cyv_why, NULL, why) != NULL) {
+ atomic_cas_ptr(&cyc_coverage[ndx].cyv_why, NULL, why) !=
+ NULL) {
if (++ndx == CY_NCOVERAGE)
ndx = 0;
if (ndx == orig)
@@ -1217,13 +1218,14 @@
ASSERT(cyclic->cy_arg == arg);
goto reread;
}
if ((opend =
- cas32(&cyclic->cy_pend, pend, npend)) != pend) {
+ atomic_cas_32(&cyclic->cy_pend, pend, npend)) !=
+ pend) {
/*
- * Our cas32 can fail for one of several
+ * Our atomic_cas_32 can fail for one of several
* reasons:
*
* (a) An intervening high level bumped up the
* pend count on this cyclic. In this
* case, we will see a higher pend.
@@ -1309,11 +1311,12 @@
ASSERT(cpu->cyp_state == CYS_EXPANDING);
do {
lev = cpu->cyp_modify_levels;
nlev = lev + 1;
- } while (cas32(&cpu->cyp_modify_levels, lev, nlev) != lev);
+ } while (atomic_cas_32(&cpu->cyp_modify_levels, lev, nlev) !=
+ lev);
/*
* If we are the last soft level to see the modification,
* post on cyp_modify_wait. Otherwise, (if we're not
* already at low level), post down to the next soft level.