From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LATkc-00018K-Nv for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LATkZ-00015r-5K for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:31 -0500 Received: from [199.232.76.173] (port=42923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LATkY-00015b-TC for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:30 -0500 Received: from mx20.gnu.org ([199.232.41.8]:34086) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LATkY-0004WI-Hj for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:30 -0500 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LATkX-0001nH-Dc for qemu-devel@nongnu.org; Wed, 10 Dec 2008 13:25:30 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBAIPPax024297 for ; Wed, 10 Dec 2008 13:25:25 -0500 From: Eduardo Habkost Date: Wed, 10 Dec 2008 16:24:22 -0200 Message-Id: <1228933464-7670-12-git-send-email-ehabkost@redhat.com> In-Reply-To: <1228933464-7670-1-git-send-email-ehabkost@redhat.com> References: <1228933464-7670-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 11/13] target-i386/op_helper.c: LOG_PCALL macro Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost This macro will avoid some #ifdefs in the code and create a single point where the logging call can be changed in the future. Signed-off-by: Eduardo Habkost --- target-i386/op_helper.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index d32a6a3..13f65e1 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -23,6 +23,17 @@ //#define DEBUG_PCALL + +#ifdef DEBUG_PCALL +# define LOG_PCALL(...) do { \ + if (loglevel & CPU_LOG_PCALL) \ + fprintf(logfile, __VA_ARGS__); \ + } while (0) +#else +# define LOG_PCALL(...) do { } while (0) +#endif + + #if 0 #define raise_exception_err(a, b)\ do {\ -- 1.5.5.GIT