]> git.proxmox.com Git - mirror_spl.git/commit - module/splat/splat-taskq.c
Add ddi_time_after and friends
authorChunwei Chen <tuxoko@gmail.com>
Tue, 25 Feb 2014 09:16:55 +0000 (17:16 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Apr 2014 16:32:01 +0000 (09:32 -0700)
commit545e9ac00a813ed13d6b67c86d058c9048d78552
tree9164a7e2f9949ba173346cf2daddf5be4f6bba2a
parent6c48cd8ac223eb00cb4dadebcbe4ce1dfdfc6b76
Add ddi_time_after and friends

When comparing times gotten from ddi_get_lbolt, we have to take account of
wrap around of jiffies. Therefore, we cannot use 't1 < t2'. Instead we should
use 't1 - t2 < 0'.

This patch add ddi_time_after and friends to address this issue. They have
strict type restriction, clock_t for vanilla and int64_t for 64 version, to
prevent type conversion from screwing things.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #335
include/sys/timer.h
module/splat/splat-taskq.c