Print this page
5042 stop using deprecated atomic functions

*** 47,57 **** do { oldval = *count_p; newval = oldval - n; if (oldval <= n) return (0); /* no resources left */ ! } while (cas32(count_p, oldval, newval) != oldval); return (newval); } /* --- 47,57 ---- do { oldval = *count_p; newval = oldval - n; if (oldval <= n) return (0); /* no resources left */ ! } while (atomic_cas_32(count_p, oldval, newval) != oldval); return (newval); } /*
*** 68,78 **** /* ATOMICALLY */ do { oldval = *count_p; newval = oldval + n; ! } while (cas32(count_p, oldval, newval) != oldval); } /* * Callback code invoked from STREAMs when the recv data buffer is free * for recycling. --- 68,78 ---- /* ATOMICALLY */ do { oldval = *count_p; newval = oldval + n; ! } while (atomic_cas_32(count_p, oldval, newval) != oldval); } /* * Callback code invoked from STREAMs when the recv data buffer is free * for recycling.