Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 1225,1242 ****
* enable/disable collection of stats for hat.
*/
int
hat_stats_enable(hat_t *hat)
{
! atomic_add_32(&hat->hat_stats, 1);
return (1);
}
void
hat_stats_disable(hat_t *hat)
{
! atomic_add_32(&hat->hat_stats, -1);
}
/*
* 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.
--- 1225,1242 ----
* enable/disable collection of stats for hat.
*/
int
hat_stats_enable(hat_t *hat)
{
! atomic_inc_32(&hat->hat_stats);
return (1);
}
void
hat_stats_disable(hat_t *hat)
{
! 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.