From 806b9d586873b1815887946c6b8a0aae1fe267b8 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 6 Apr 2013 18:15:21 +0200 Subject: pfinet: fix timeout evaluation * pfinet/timer-emul.c (timer_function): Fix comparison between expire time and jiffies. --- pfinet/timer-emul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pfinet') diff --git a/pfinet/timer-emul.c b/pfinet/timer-emul.c index 5a503597..f6760d7e 100644 --- a/pfinet/timer-emul.c +++ b/pfinet/timer-emul.c @@ -51,7 +51,7 @@ timer_function (void *this_is_a_pointless_variable_with_a_rather_long_name) if (!timers) wait = -1; - else if (timers->expires < jiff) + else if (timers->expires <= jiff) wait = 0; else wait = ((timers->expires - jiff) * 1000) / HZ; @@ -64,7 +64,7 @@ timer_function (void *this_is_a_pointless_variable_with_a_rather_long_name) pthread_mutex_lock (&global_lock); - while (timers->expires < jiffies) + while (timers->expires <= jiffies) { struct timer_list *tp; -- cgit v1.2.3