Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*


 226         kstat_named_t   rctimers;
 227         kstat_named_t   rcnomem;
 228         kstat_named_t   rccantsend;
 229 } clts_rcstat_tmpl = {
 230         { "calls",      KSTAT_DATA_UINT64 },
 231         { "badcalls",   KSTAT_DATA_UINT64 },
 232         { "retrans",    KSTAT_DATA_UINT64 },
 233         { "badxids",    KSTAT_DATA_UINT64 },
 234         { "timeouts",   KSTAT_DATA_UINT64 },
 235         { "newcreds",   KSTAT_DATA_UINT64 },
 236         { "badverfs",   KSTAT_DATA_UINT64 },
 237         { "timers",     KSTAT_DATA_UINT64 },
 238         { "nomem",      KSTAT_DATA_UINT64 },
 239         { "cantsend",   KSTAT_DATA_UINT64 },
 240 };
 241 
 242 static uint_t clts_rcstat_ndata =
 243         sizeof (clts_rcstat_tmpl) / sizeof (kstat_named_t);
 244 
 245 #define RCSTAT_INCR(s, x)                       \
 246         atomic_add_64(&(s)->x.value.ui64, 1)
 247 
 248 #define ptoh(p)         (&((p)->cku_client))
 249 #define htop(h)         ((struct cku_private *)((h)->cl_private))
 250 
 251 /*
 252  * Times to retry
 253  */
 254 #define SNDTRIES        4
 255 #define REFRESHES       2       /* authentication refreshes */
 256 
 257 /*
 258  * The following is used to determine the global default behavior for
 259  * CLTS when binding to a local port.
 260  *
 261  * If the value is set to 1 the default will be to select a reserved
 262  * (aka privileged) port, if the value is zero the default will be to
 263  * use non-reserved ports.  Users of kRPC may override this by using
 264  * CLNT_CONTROL() and CLSET_BINDRESVPORT.
 265  */
 266 static int clnt_clts_do_bindresvport = 1;




 226         kstat_named_t   rctimers;
 227         kstat_named_t   rcnomem;
 228         kstat_named_t   rccantsend;
 229 } clts_rcstat_tmpl = {
 230         { "calls",      KSTAT_DATA_UINT64 },
 231         { "badcalls",   KSTAT_DATA_UINT64 },
 232         { "retrans",    KSTAT_DATA_UINT64 },
 233         { "badxids",    KSTAT_DATA_UINT64 },
 234         { "timeouts",   KSTAT_DATA_UINT64 },
 235         { "newcreds",   KSTAT_DATA_UINT64 },
 236         { "badverfs",   KSTAT_DATA_UINT64 },
 237         { "timers",     KSTAT_DATA_UINT64 },
 238         { "nomem",      KSTAT_DATA_UINT64 },
 239         { "cantsend",   KSTAT_DATA_UINT64 },
 240 };
 241 
 242 static uint_t clts_rcstat_ndata =
 243         sizeof (clts_rcstat_tmpl) / sizeof (kstat_named_t);
 244 
 245 #define RCSTAT_INCR(s, x)                       \
 246         atomic_inc_64(&(s)->x.value.ui64)
 247 
 248 #define ptoh(p)         (&((p)->cku_client))
 249 #define htop(h)         ((struct cku_private *)((h)->cl_private))
 250 
 251 /*
 252  * Times to retry
 253  */
 254 #define SNDTRIES        4
 255 #define REFRESHES       2       /* authentication refreshes */
 256 
 257 /*
 258  * The following is used to determine the global default behavior for
 259  * CLTS when binding to a local port.
 260  *
 261  * If the value is set to 1 the default will be to select a reserved
 262  * (aka privileged) port, if the value is zero the default will be to
 263  * use non-reserved ports.  Users of kRPC may override this by using
 264  * CLNT_CONTROL() and CLSET_BINDRESVPORT.
 265  */
 266 static int clnt_clts_do_bindresvport = 1;