Print this page
XXXX pass in cpu_pause_func via pause_cpus

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/cpu_event.c
          +++ new/usr/src/uts/common/os/cpu_event.c
↓ open down ↓ 388 lines elided ↑ open up ↑
 389  389          if (!MUTEX_HELD(&cpu_lock)) {
 390  390                  mutex_enter(&cpu_lock);
 391  391                  unlock = 1;
 392  392          }
 393  393          /*
 394  394           * Pause all other CPUs (and let them run pause thread).
 395  395           * It's guaranteed that no other threads will access cpu_idle_cb_array
 396  396           * after pause_cpus().
 397  397           */
 398  398          if (!cpus_paused()) {
 399      -                pause_cpus(NULL);
      399 +                pause_cpus(NULL, NULL);
 400  400                  unpause = 1;
 401  401          }
 402  402  
 403  403          /* Copy content to new buffer if needed. */
 404  404          if (buf_new != NULL) {
 405  405                  buf_old = (char *)cpu_idle_cb_array;
 406  406                  cnt_old = cpu_idle_cb_max;
 407  407                  if (buf_old != NULL) {
 408  408                          ASSERT(cnt_old != 0);
 409  409                          bcopy(cpu_idle_cb_array, buf_new,
↓ open down ↓ 45 lines elided ↑ open up ↑
 455  455          if (!MUTEX_HELD(&cpu_lock)) {
 456  456                  mutex_enter(&cpu_lock);
 457  457                  unlock = 1;
 458  458          }
 459  459          /*
 460  460           * Pause all other CPUs.
 461  461           * It's guaranteed that no other threads will access cpu_idle_cb_array
 462  462           * after pause_cpus().
 463  463           */
 464  464          if (!cpus_paused()) {
 465      -                pause_cpus(NULL);
      465 +                pause_cpus(NULL, NULL);
 466  466                  unpause = 1;
 467  467          }
 468  468  
 469  469          /* Remove cip from array. */
 470  470          for (i = 0; i < cpu_idle_cb_curr; i++) {
 471  471                  if (found == 0) {
 472  472                          if (cpu_idle_cb_array[i].impl == cip) {
 473  473                                  found = 1;
 474  474                          }
 475  475                  } else {
↓ open down ↓ 681 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX