From patchwork Sun Jul 15 20:24:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 171095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 52E982C0097 for ; Mon, 16 Jul 2012 06:31:20 +1000 (EST) Received: from localhost ([::1]:48785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqVOi-0003N2-9F for incoming@patchwork.ozlabs.org; Sun, 15 Jul 2012 16:26:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqVO2-0001i8-8p for qemu-devel@nongnu.org; Sun, 15 Jul 2012 16:25:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqVO1-00084X-5C for qemu-devel@nongnu.org; Sun, 15 Jul 2012 16:25:50 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:22563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqVO0-00084J-S4 for qemu-devel@nongnu.org; Sun, 15 Jul 2012 16:25:49 -0400 Received: from wf-rch.minyard.home ([unknown] [173.57.151.210]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M7700584Y24USJ2@vms173003.mailsrvcs.net> for qemu-devel@nongnu.org; Sun, 15 Jul 2012 15:25:22 -0500 (CDT) Received: from i.minyard.home (i2.minyard.home [192.168.27.116]) by wf-rch.minyard.home (Postfix) with ESMTP id 818171F952; Sun, 15 Jul 2012 15:25:13 -0500 (CDT) Received: by i.minyard.home (Postfix, from userid 1000) id 428D0811FB; Sun, 15 Jul 2012 15:25:11 -0500 (CDT) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Sun, 15 Jul 2012 15:24:58 -0500 Message-id: <1342383911-6094-3-git-send-email-minyard@acm.org> X-Mailer: git-send-email 1.7.4.1 In-reply-to: <1342383911-6094-1-git-send-email-minyard@acm.org> References: <1342383911-6094-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-Received-From: 206.46.173.3 Cc: Corey Minyard Subject: [Qemu-devel] [PATCH 03/16] vl: Move init_timer_alarm() earlier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Corey Minyard The timers may be used in initialization, so move them earlier so they are ready. A reconnect options will be added to qemu-char, and it uses a timer, but the timer alarm wasn't initialized yet. Signed-off-by: Corey Minyard --- vl.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index 52b6588..0f0bcd9 100644 --- a/vl.c +++ b/vl.c @@ -3245,6 +3245,11 @@ int main(int argc, char **argv, char **envp) qemu_set_version(machine->hw_version); } + if (init_timer_alarm() < 0) { + fprintf(stderr, "could not initialize alarm timer\n"); + exit(1); + } + /* Init CPU def lists, based on config * - Must be called after all the qemu_read_config_file() calls * - Must be called before list_cpus() @@ -3422,11 +3427,6 @@ int main(int argc, char **argv, char **envp) os_set_line_buffering(); - if (init_timer_alarm() < 0) { - fprintf(stderr, "could not initialize alarm timer\n"); - exit(1); - } - #ifdef CONFIG_SPICE /* spice needs the timers to be initialized by this point */ qemu_spice_init();