From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCbEz-0003dK-OQ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 16:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCbEu-0004MF-Os for qemu-devel@nongnu.org; Thu, 22 Aug 2013 16:12:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCbEu-0004M1-A8 for qemu-devel@nongnu.org; Thu, 22 Aug 2013 16:12:16 -0400 From: Stefan Hajnoczi Date: Thu, 22 Aug 2013 22:11:08 +0200 Message-Id: <1377202298-22896-13-git-send-email-stefanha@redhat.com> In-Reply-To: <1377202298-22896-1-git-send-email-stefanha@redhat.com> References: <1377202298-22896-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 12/42] 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: Stefan Hajnoczi , Alex Bligh , Anthony Liguori From: Alex Bligh Make treatment of disabled clocks consistent in deadline calculation Signed-off-by: Alex Bligh Signed-off-by: Stefan Hajnoczi --- qemu-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-timer.c b/qemu-timer.c index df8f12b..be29adf 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -264,7 +264,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.8.3.1