Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -1225,18 +1225,18 @@
* enable/disable collection of stats for hat.
*/
int
hat_stats_enable(hat_t *hat)
{
- atomic_add_32(&hat->hat_stats, 1);
+ atomic_inc_32(&hat->hat_stats);
return (1);
}
void
hat_stats_disable(hat_t *hat)
{
- atomic_add_32(&hat->hat_stats, -1);
+ atomic_dec_32(&hat->hat_stats);
}
/*
* Utility to sync the ref/mod bits from a page table entry to the page_t
* We must be holding the mapping list lock when this is called.