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

@@ -1150,11 +1150,11 @@
 {
         fcoe_worker_t   *w = (fcoe_worker_t *)arg;
         fcoe_i_frame_t  *fmi;
         int             ret;
 
-        atomic_add_32(&fcoe_nworkers_running, 1);
+        atomic_inc_32(&fcoe_nworkers_running);
         mutex_enter(&w->worker_lock);
         w->worker_flags |= FCOE_WORKER_STARTED | FCOE_WORKER_ACTIVE;
         while ((w->worker_flags & FCOE_WORKER_TERMINATE) == 0) {
                 /*
                  * loop through the frames

@@ -1179,11 +1179,11 @@
                 cv_wait(&w->worker_cv, &w->worker_lock);
                 w->worker_flags |= FCOE_WORKER_ACTIVE;
         }
         w->worker_flags &= ~(FCOE_WORKER_STARTED | FCOE_WORKER_ACTIVE);
         mutex_exit(&w->worker_lock);
-        atomic_add_32(&fcoe_nworkers_running, -1);
+        atomic_dec_32(&fcoe_nworkers_running);
         list_destroy(&w->worker_frm_list);
 }
 
 void
 fcoe_post_frame(fcoe_frame_t *frm)