From patchwork Mon Oct 29 18:07:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 195103 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 DB5D52C008C for ; Tue, 30 Oct 2012 05:09:33 +1100 (EST) Received: from localhost ([::1]:56954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStmF-0005e1-VW for incoming@patchwork.ozlabs.org; Mon, 29 Oct 2012 14:09:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStlB-0003cd-RK for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TStlA-0005kb-LF for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:25 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:61159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStlA-0005ZP-EC for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:24 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so3395861pad.4 for ; Mon, 29 Oct 2012 11:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=fDTSdgxTrlS88MnRnSIgl5XTNOAbXJi3brXQbGCGcs0=; b=tdgNrCIxvipbKFO5Eq1br2dVddhGClVTDv5CWZX49pyJWCedKIVDZcBDjsXoMoRUgv 3RxWeC4OM19o85OfJ8M2YHyN5B5jcroQH52d/BamDHplfrVSl1o+ejgscMNU98j3t+YJ 6zigJ1/r5K+wf/qT20I2HT5hPJTxy8jfbl9RE1zV8HVnZ742jq356i30vwg1hfqYuBwQ 0MqdxnuXIH8xp7UZm/coirm9CLVe8mUhLXgdOt2c5v33QxJygBzPwJvv+/SP5L1LJfOI xYSCVZQoglQiiJa2LEgHzLYpkYMS1pqxpmfnQrjBH8g/g1myP2DRywkwlmZBUynfQTQh 3kTg== Received: by 10.68.219.106 with SMTP id pn10mr21753239pbc.41.1351534104140; Mon, 29 Oct 2012 11:08:24 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id vi9sm6327135pbc.41.2012.10.29.11.08.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 11:08:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2012 19:07:16 +0100 Message-Id: <1351534038-15503-10-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> References: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Subject: [Qemu-devel] [PATCH 09/11] main-loop: unify qemu_init_main_loop between QEMU and tools 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 Signed-off-by: Paolo Bonzini --- main-loop.c | 5 ++++- main-loop.h | 10 ---------- qemu-tool.c | 7 ------- vl.c | 5 ----- 4 file modificati, 4 inserzioni(+), 23 rimozioni(-) diff --git a/main-loop.c b/main-loop.c index eb3b6e6..baefe41 100644 --- a/main-loop.c +++ b/main-loop.c @@ -199,10 +199,13 @@ static int qemu_signal_init(void) } #endif -int main_loop_init(void) +int qemu_init_main_loop(void) { int ret; + init_clocks(); + init_timer_alarm(); + qemu_mutex_lock_iothread(); ret = qemu_signal_init(); if (ret) { diff --git a/main-loop.h b/main-loop.h index dce1cd9..91a0aff 100644 --- a/main-loop.h +++ b/main-loop.h @@ -43,16 +43,6 @@ int qemu_init_main_loop(void); /** - * main_loop_init: Initializes main loop - * - * Internal (but shared for compatibility reasons) initialization routine - * for the main loop. This should not be used by applications directly, - * use qemu_init_main_loop() instead. - * - */ -int main_loop_init(void); - -/** * main_loop_wait: Run one iteration of the main loop. * * If @nonblocking is true, poll for events, otherwise suspend until diff --git a/qemu-tool.c b/qemu-tool.c index 84273ae..28a4e8d 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -92,13 +92,6 @@ void qemu_clock_warp(QEMUClock *clock) { } -int qemu_init_main_loop(void) -{ - init_clocks(); - init_timer_alarm(); - return main_loop_init(); -} - void slirp_update_timeout(uint32_t *timeout) { } diff --git a/vl.c b/vl.c index 6dd767c..3f090f8 100644 --- a/vl.c +++ b/vl.c @@ -2369,11 +2369,6 @@ static void free_and_trace(gpointer mem) free(mem); } -int qemu_init_main_loop(void) -{ - return main_loop_init(); -} - int main(int argc, char **argv, char **envp) { int i;