Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -463,11 +463,11 @@
{ "nomem", KSTAT_DATA_UINT64 },
{ "interrupts", KSTAT_DATA_UINT64 }
};
#define COTSRCSTAT_INCR(p, x) \
- atomic_add_64(&(p)->x.value.ui64, 1)
+ atomic_inc_64(&(p)->x.value.ui64)
#define CLNT_MAX_CONNS 1 /* concurrent connections between clnt/srvr */
int clnt_max_conns = CLNT_MAX_CONNS;
#define CLNT_MIN_TIMEOUT 10 /* seconds to wait after we get a */
@@ -2793,11 +2793,11 @@
/*
* We need to increment rpc_kstat_instance atomically to prevent
* two kstats being created with the same instance.
*/
- kstat_instance = atomic_add_32_nv((uint32_t *)&rpc_kstat_instance, 1);
+ kstat_instance = atomic_inc_32_nv((uint32_t *)&rpc_kstat_instance);
if ((cm_entry->x_ksp = kstat_create_zone("unix", kstat_instance,
"rpc_cots_connections", "rpc", KSTAT_TYPE_NAMED,
(uint_t)(sizeof (cm_kstat_xprt_t) / sizeof (kstat_named_t)),
KSTAT_FLAG_VIRTUAL, cm_entry->x_zoneid)) == NULL) {