Print this page
5042 stop using deprecated atomic functions

@@ -2771,12 +2771,12 @@
                                  */
                                 if (new > LGRP_LOADAVG_MAX)
                                         new = LGRP_LOADAVG_MAX;
                                 else if (new < 0)
                                         new = 0;
-                        } while (cas32((lgrp_load_t *)&lpl->lpl_loadavg, old,
-                            new) != old);
+                        } while (atomic_cas_32((lgrp_load_t *)&lpl->lpl_loadavg,
+                            old, new) != old);
                 } else {
                         /*
                          * We're supposed to update the load, but not age it.
                          * This option is used to update the load (which either
                          * has already been aged in this 1/10 sec. interval or

@@ -2790,12 +2790,12 @@
                                  * Check for overflow
                                  * Underflow not possible here
                                  */
                                 if (new < old)
                                         new = LGRP_LOADAVG_MAX;
-                        } while (cas32((lgrp_load_t *)&lpl->lpl_loadavg, old,
-                            new) != old);
+                        } while (atomic_cas_32((lgrp_load_t *)&lpl->lpl_loadavg,
+                            old, new) != old);
                 }
 
                 /*
                  * Do the same for this lpl's parent
                  */

@@ -3352,11 +3352,11 @@
                                                  * added in the anticipatory
                                                  * load
                                                  */
                                                 new = 0;
                                         }
-                                } while (cas32(
+                                } while (atomic_cas_32(
                                     (lgrp_load_t *)&lpl->lpl_loadavg, old,
                                     new) != old);
 
                                 lpl = lpl->lpl_parent;
                                 if (lpl == NULL)

@@ -3421,12 +3421,12 @@
                                  * Check for overflow
                                  * Underflow not possible here
                                  */
                                 if (new < old)
                                         new = UINT32_MAX;
-                        } while (cas32((lgrp_load_t *)&lpl->lpl_loadavg, old,
-                            new) != old);
+                        } while (atomic_cas_32((lgrp_load_t *)&lpl->lpl_loadavg,
+                            old, new) != old);
 
                         lpl = lpl->lpl_parent;
                         if (lpl == NULL)
                                 break;
                 }