From patchwork Fri Dec 9 20:14:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 130456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 35F8E1007D7 for ; Sat, 10 Dec 2011 07:15:15 +1100 (EST) Received: from localhost ([::1]:44035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qW-0005sw-6v for incoming@patchwork.ozlabs.org; Fri, 09 Dec 2011 15:15:04 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qO-0005l2-5U for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:14:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RZ6qM-00036V-EI for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:14:56 -0500 Received: from gw.ac.upc.edu ([147.83.30.3]:40198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qM-00036D-8B for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:14:54 -0500 Received: from localhost (unknown [84.88.53.92]) by gw.ac.upc.edu (Postfix) with ESMTP id 27D3C6B01CA for ; Fri, 9 Dec 2011 21:14:53 +0100 (CET) To: qemu-devel@nongnu.org From: =?utf-8?b?TGx1w61z?= Vilanova Date: Fri, 09 Dec 2011 21:14:46 +0100 Message-ID: <20111209201446.11487.97659.stgit@ginnungagap.bsc.es> In-Reply-To: <20111209201430.11487.82078.stgit@ginnungagap.bsc.es> References: <20111209201430.11487.82078.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 147.83.30.3 Subject: [Qemu-devel] [PATCH 1/7] Make 'qemu_init_vcpu' a function (instead of a macro) 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 Implementation with 'CONFIG_USER_ONLY' is moved into new file 'cpus-user.c'. Signed-off-by: Lluís Vilanova --- Makefile.objs | 1 + cpus-user.c | 15 +++++++++++++++ qemu-common.h | 4 ---- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 cpus-user.c diff --git a/Makefile.objs b/Makefile.objs index f153fa5..b17b64f 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -178,6 +178,7 @@ user-obj-y = user-obj-y += envlist.o path.o user-obj-y += tcg-runtime.o host-utils.o user-obj-y += cutils.o cache-utils.o +user-obj-y += cpus-user.o user-obj-y += $(trace-obj-y) ###################################################################### diff --git a/cpus-user.c b/cpus-user.c new file mode 100644 index 0000000..50e45ce --- /dev/null +++ b/cpus-user.c @@ -0,0 +1,15 @@ +/* + * Implementation of routines in "cpus.c" when compiling for CONFIG_USER_ONLY. + * + * Copyright (C) 2011 Lluís Vilanova + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu-common.h" + + +void qemu_init_vcpu(void *env) +{ +} diff --git a/qemu-common.h b/qemu-common.h index 2ce47aa..2cd838a 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -265,11 +265,7 @@ struct qemu_work_item { int done; }; -#ifdef CONFIG_USER_ONLY -#define qemu_init_vcpu(env) do { } while (0) -#else void qemu_init_vcpu(void *env); -#endif typedef struct QEMUIOVector { struct iovec *iov;