Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/modctl.c
          +++ new/usr/src/uts/common/os/modctl.c
↓ open down ↓ 3914 lines elided ↑ open up ↑
3915 3915          for (;;) {
3916 3916                  mutex_enter(&mod_uninstall_lock);
3917 3917                  CALLB_CPR_SAFE_BEGIN(&cprinfo);
3918 3918                  /*
3919 3919                   * In DEBUG kernels, unheld drivers are uninstalled periodically
3920 3920                   * every mod_uninstall_interval seconds.  Periodic uninstall can
3921 3921                   * be disabled by setting mod_uninstall_interval to 0 which is
3922 3922                   * the default for a non-DEBUG kernel.
3923 3923                   */
3924 3924                  if (mod_uninstall_interval) {
3925      -                        ticks = drv_usectohz(mod_uninstall_interval * 1000000);
     3925 +                        ticks = drv_sectohz(mod_uninstall_interval);
3926 3926                          (void) cv_reltimedwait(&mod_uninstall_cv,
3927 3927                              &mod_uninstall_lock, ticks, TR_CLOCK_TICK);
3928 3928                  } else {
3929 3929                          cv_wait(&mod_uninstall_cv, &mod_uninstall_lock);
3930 3930                  }
3931 3931                  /*
3932 3932                   * The whole daemon is safe for CPR except we don't want
3933 3933                   * the daemon to run if FREEZE is issued and this daemon
3934 3934                   * wakes up from the cv_wait above. In this case, it'll be
3935 3935                   * blocked in CALLB_CPR_SAFE_END until THAW is issued.
↓ open down ↓ 899 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX