diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-06-25 14:30:39 -0500 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2007-06-25 14:30:39 -0500 |
commit | 512cd3f469fe8408ce70d90d2b2847332082bfdf (patch) | |
tree | 49aafbecd8df4d5cad86e9f134f41b11b460f174 /usr/actor.c | |
parent | 89d0ac0c9bebedc12316d2d748ea764a704cd608 (diff) | |
download | open-iscsi-512cd3f469fe8408ce70d90d2b2847332082bfdf.tar.gz |
fix actor diff
We want to subtract the largest u64 to calculate rollover, and
we want to use 64 bits since all the other args are that large.
Diffstat (limited to 'usr/actor.c')
-rw-r--r-- | usr/actor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/actor.c b/usr/actor.c index ce673a6..84eb7ce 100644 --- a/usr/actor.c +++ b/usr/actor.c @@ -30,11 +30,11 @@ static volatile int poll_in_progress; static volatile uint64_t actor_jiffies = 0; #define actor_diff(_time1, _time2) ({ \ - uint32_t __ret; \ + uint64_t __ret; \ if ((_time2) >= (_time1)) \ __ret = (_time2) - (_time1); \ else \ - __ret = (0xffffffff - (_time1)) + (_time2); \ + __ret = ((~0ULL) - (_time1)) + (_time2); \ __ret; \ }) |