Use ddi_time_after and friends to compare time

Also, make sure we use clock_t for ddi_get_lbolt to prevent type conversion
from screwing things.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2142
This commit is contained in:
Chunwei Chen
2014-02-25 17:32:21 +08:00
committed by Brian Behlendorf
parent 888f7141a3
commit 0b75bdb369
6 changed files with 22 additions and 10 deletions
+2 -2
View File
@@ -480,7 +480,7 @@ txg_sync_thread(dsl_pool_t *dp)
tx_state_t *tx = &dp->dp_tx;
callb_cpr_t cpr;
vdev_stat_t *vs1, *vs2;
uint64_t start, delta;
clock_t start, delta;
#ifdef _KERNEL
/*
@@ -498,7 +498,7 @@ txg_sync_thread(dsl_pool_t *dp)
start = delta = 0;
for (;;) {
uint64_t timer, timeout;
clock_t timer, timeout;
uint64_t txg;
uint64_t ndirty;