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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/contract.c
          +++ new/usr/src/uts/common/os/contract.c
↓ open down ↓ 2294 lines elided ↑ open up ↑
2295 2295          ct_equeue_t *q;
2296 2296          timespec_t ts;
2297 2297          uint64_t evid;
2298 2298          ct_kevent_t *negev;
2299 2299          int negend;
2300 2300  
2301 2301          e->cte_contract = ct;
2302 2302          e->cte_data = data;
2303 2303          e->cte_gdata = gdata;
2304 2304          e->cte_refs = 3;
2305      -        evid = e->cte_id = atomic_add_64_nv(&ct->ct_type->ct_type_evid, 1);
     2305 +        evid = e->cte_id = atomic_inc_64_nv(&ct->ct_type->ct_type_evid);
2306 2306          contract_hold(ct);
2307 2307  
2308 2308          /*
2309 2309           * For a negotiation event we set the ct->ct_nevent field of the
2310 2310           * contract for the duration of the negotiation
2311 2311           */
2312 2312          negend = 0;
2313 2313          if (e->cte_flags & CTE_NEG) {
2314 2314                  cte_hold(e);
2315 2315                  ct->ct_nevent = e;
↓ open down ↓ 372 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX