Received: from eggs.gnu.org ([2001:4830:134:3::10]:59091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6r0W-0001Td-Ry for qemu-devel@nongnu.org; Tue, 06 Aug 2013 19:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6r0U-0001OS-Ll for qemu-devel@nongnu.org; Tue, 06 Aug 2013 19:49:40 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:47442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6r0U-0001OM-Fm for qemu-devel@nongnu.org; Tue, 06 Aug 2013 19:49:38 -0400 From: Alex Bligh Date: Wed, 7 Aug 2013 00:48:57 +0100 Message-Id: <1375832956-7588-4-git-send-email-alex@alex.org.uk> In-Reply-To: <1375832956-7588-1-git-send-email-alex@alex.org.uk> References: <1375832956-7588-1-git-send-email-alex@alex.org.uk> Subject: [Qemu-devel] [RFC] [PATCHv7 03/22] aio / timers: Consistent treatment of disabled clocks for deadlines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , liu ping fan , Stefan Hajnoczi , Paolo Bonzini , MORITA Kazutaka , rth@twiddle.net Make treatment of disabled clocks consistent in deadline calculation Signed-off-by: Alex Bligh --- qemu-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-timer.c b/qemu-timer.c index 2a862bc..0617e3e 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -269,7 +269,7 @@ int64_t qemu_clock_deadline(QEMUClock *clock) /* To avoid problems with overflow limit this to 2^32. */ int64_t delta = INT32_MAX; - if (clock->active_timers) { + if (clock->enabled && clock->active_timers) { delta = clock->active_timers->expire_time - qemu_get_clock_ns(clock); } if (delta < 0) { -- 1.7.9.5