From patchwork Tue Feb 20 09:16:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 875444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zlw4z4YJ0z9ryl for ; Tue, 20 Feb 2018 20:17:55 +1100 (AEDT) Received: from localhost ([::1]:54259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo43d-0003vT-M2 for incoming@patchwork.ozlabs.org; Tue, 20 Feb 2018 04:17:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo42l-0003sI-MN for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:17:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo42j-0005jT-5X for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:16:59 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eo42i-0005iX-SD for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:16:57 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M3jhh-1eVz1a0VcH-00rHrR; Tue, 20 Feb 2018 10:16:47 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 20 Feb 2018 10:16:40 +0100 Message-Id: <20180220091640.10875-5-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180220091640.10875-1-laurent@vivier.eu> References: <20180220091640.10875-1-laurent@vivier.eu> X-Provags-ID: V03:K0:XFskgHX2TKLxtZgojCZfvmZ5bZ5HBeRL9HiOu+SfDPlETIsMbgN ABIdw4m6qTk0I5X2PU4Cp3+FZsyAZXmDphkP/YegVEn9UmeC/mqG6Xg8VhLcAtjsY5QRuWM q7ILfymCFcAMf1IB0UJ6jrI91+vS9El9j2Whad0JuveOnDfG6wOvyUqkLRHFSzMhqnLx9n4 +1o8sSDAYA/PSLbJ+EXIQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:FjS+w5rL9ZM=:pI3ftcqC4ZO52y6NKIaEiD XGEjBZOfaPD6QzzTO/4RRmoKflz1pveCDIRefWxTt52y3Rvep1X5Jj8h0ZYLOI8QSZd1sxiAo P59cqq//qTP4x+5GYHM71ukufSeAxCQtQF3rER1iXsmBw02vGdekL/ALAfvt4cxCV7wwpQC7n nc/eIHkpLKN7xWKyH6DKZHTndSw1CcsaKHFTfBEaj3FbY99prDhrVKAsdyvKHiq8+rZ10T2Lc I6DesXB3RTi/6cxnDoMlDPxoK63Twucc4S+BnYvI96s8o7MpHNipmE1yF9ZUjMAAIdKN1VcPI x+YH9duCMXB/ax7oLa8t2uAKcEyloDXaf35S9yRu7H2fLIDEWRvZKKVhWixPxm5lA2GbWPUnm TwwOQV70aVGrAzM5NbNXnM3ysRpnzQ4M0E/5CjeUbd4rYUrn9w937uGjJNZo7bM1lAJbgs3P3 MQqAllge24Lx/iKlLAktH+gfv4XzHhfbhAFdrhM9BrMS0sXmKopDX3DgOBTg9ez5QL8pG/tJ+ YGIFBzfUXBve6V3Q1swaKjsWBpqLrL0IckPorJwMoJqu5fWVjp7VHsQ2NuaqtrdlmzikfyRCO LYsX/PtjG+E4sZMvssY63X00sjpNpcL70105sgcOtluW/rM1GsSn92gHBLugIDauXY5WqaFop LhcMJoRQLcOHZT+nrOL3OynU+HSM0658bJyhM3p4oHXrtCy++ZbE1X5tELiFKaI5Bpk94u4pW Ehh+Tv59E7bNISoRChGmAja0CvxPO5qanFLS/A== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL 4/4] linux-user: Remove THREAD macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Back when we used to support compiling either with or without NPTL threading library support, we used a macro THREAD which would expand either to nothing (no thread support) or to __thread (threads supported). For a long time now we have required thread support, so remove the macro and just use __thread directly as other parts of QEMU do. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180213132246.26844-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/main.c | 2 +- linux-user/qemu.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 7de0e02487..fd7900628b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3835,7 +3835,7 @@ void cpu_loop(CPUHPPAState *env) #endif /* TARGET_HPPA */ -THREAD CPUState *thread_cpu; +__thread CPUState *thread_cpu; bool qemu_cpu_is_self(CPUState *cpu) { diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 4edd7d0c08..bc4bf35036 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -18,8 +18,6 @@ #include "exec/gdbstub.h" #include "qemu/queue.h" -#define THREAD __thread - /* This is the size of the host kernel's sigset_t, needed where we make * direct system calls that take a sigset_t pointer and a size. */ @@ -201,7 +199,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8); void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2); -extern THREAD CPUState *thread_cpu; +extern __thread CPUState *thread_cpu; void cpu_loop(CPUArchState *env); const char *target_strerror(int err); int get_osversion(void);