X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fselftest%2Ftimer.c;h=8a35334b065cde4e15c5d68cdd81565e84ed5077;hb=db49fbf00d24edc8347006241f314fb0f82f1b63;hp=f4e70bd2d00a5076bc55c1259fad651f911de7f9;hpb=4ad592fa06b0a793ad7f835bedd3e7744eeca7f8;p=fs%2Flustre-release.git diff --git a/lnet/selftest/timer.c b/lnet/selftest/timer.c index f4e70bd..8a35334 100644 --- a/lnet/selftest/timer.c +++ b/lnet/selftest/timer.c @@ -27,7 +27,6 @@ */ /* * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. * * lnet/selftest/timer.c * @@ -56,7 +55,7 @@ static struct st_timer_data { spinlock_t stt_lock; /* start time of the slot processed previously */ - cfs_time_t stt_prev_slot; + time64_t stt_prev_slot; struct list_head stt_hash[STTIMER_NSLOTS]; int stt_shuttingdown; wait_queue_head_t stt_waitq; @@ -143,20 +142,20 @@ stt_expire_list(struct list_head *slot, time64_t now) } static int -stt_check_timers(cfs_time_t *last) +stt_check_timers(time64_t *last) { int expired = 0; time64_t now; - cfs_time_t this_slot; + time64_t this_slot; now = ktime_get_real_seconds(); - this_slot = now & STTIMER_SLOTTIMEMASK; + this_slot = now & STTIMER_SLOTTIMEMASK; spin_lock(&stt_data.stt_lock); - while (cfs_time_aftereq(this_slot, *last)) { + while (this_slot >= *last) { expired += stt_expire_list(STTIMER_SLOT(this_slot), now); - this_slot = cfs_time_sub(this_slot, STTIMER_SLOTTIME); + this_slot = this_slot - STTIMER_SLOTTIME; } *last = now & STTIMER_SLOTTIMEMASK; @@ -170,8 +169,6 @@ stt_timer_main (void *arg) { int rc = 0; - cfs_block_allsigs(); - while (!stt_data.stt_shuttingdown) { stt_check_timers(&stt_data.stt_prev_slot);