Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/contract/device.c
          +++ new/usr/src/uts/common/contract/device.c
↓ open down ↓ 2200 lines elided ↑ open up ↑
2201 2201          DEVI(dip)->devi_ct_count++;
2202 2202  }
2203 2203  
2204 2204  static int
2205 2205  ct_barrier_wait_for_empty(dev_info_t *dip, int secs)
2206 2206  {
2207 2207          clock_t abstime;
2208 2208  
2209 2209          ASSERT(MUTEX_HELD(&(DEVI(dip)->devi_ct_lock)));
2210 2210  
2211      -        abstime = ddi_get_lbolt() + drv_usectohz(secs*1000000);
     2211 +        abstime = ddi_get_lbolt() + drv_sectohz(secs);
2212 2212          while (DEVI(dip)->devi_ct_count) {
2213 2213                  if (cv_timedwait(&(DEVI(dip)->devi_ct_cv),
2214 2214                      &(DEVI(dip)->devi_ct_lock), abstime) == -1) {
2215 2215                          return (-1);
2216 2216                  }
2217 2217          }
2218 2218          return (0);
2219 2219  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX