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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/exit.c
          +++ new/usr/src/uts/common/os/exit.c
↓ open down ↓ 589 lines elided ↑ open up ↑
 590  590          if ((p->p_flag & SSYS) == 0) {
 591  591                  ASSERT(p->p_ct_process);
 592  592                  contract_process_exit(p->p_ct_process, p, rv);
 593  593          }
 594  594  
 595  595          /*
 596  596           * Remove pool association, and block if requested by pool_do_bind.
 597  597           */
 598  598          mutex_enter(&p->p_lock);
 599  599          ASSERT(p->p_pool->pool_ref > 0);
 600      -        atomic_add_32(&p->p_pool->pool_ref, -1);
      600 +        atomic_dec_32(&p->p_pool->pool_ref);
 601  601          p->p_pool = pool_default;
 602  602          /*
 603  603           * Now that our address space has been freed and all other threads
 604  604           * in this process have exited, set the PEXITED pool flag.  This
 605  605           * tells the pools subsystems to ignore this process if it was
 606  606           * requested to rebind this process to a new pool.
 607  607           */
 608  608          p->p_poolflag |= PEXITED;
 609  609          pool_barrier_exit();
 610  610          mutex_exit(&p->p_lock);
↓ open down ↓ 725 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX