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: 128862 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4422456ljc; Tue, 20 Feb 2018 01:19:43 -0800 (PST) X-Google-Smtp-Source: AH8x227cMaAxl1zfhKzZh2GcEobmYQU6TLBmwbWGShmuRuFqcIm1k8dbqROLnB9ill0oDecDaVhQ X-Received: by 10.37.194.131 with SMTP id s125mr11832893ybf.452.1519118383313; Tue, 20 Feb 2018 01:19:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519118383; cv=none; d=google.com; s=arc-20160816; b=I1sQPFbAL8FkQrd6pcVbtHYCGYfYmIbWjnsqCAUT2k50Bthp348rWIoqPiHdFxcDLa OG/6JmYPzv2ATBuN+tyMTcDgiLayJME9rC00x+FeF8eaNWM28YfG05cRfHT1uAaUWBKX WeoOJSEp0rBwDhT6U9+uBJfP/wVVE1K7trl2lS8Llrg2FsCie/VSs5nh/in5RiSQEDMc ThH6+keYN2ZB+/Q5jTrplv9GlHNElR74V0UQvyQwbf2h7cDWrtzzjJGSDQIkwoNeEM+7 Q+b49UuTSBacb50mEPTP1W7chAtVtxjVzfSe545R0Fq2vROwSQZ0KCgKLDsvML+DdJ++ rHDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=7IqaEZwLWXAmoiKaDraxkAVTz97MgPOwHWOsZoiN/xg=; b=Ty0OpEPdw9hqTx9pBeuYWDAKf78qNabOA2pMv0O1vnpNXeuSo+yJWRNIoqwMtjP7yZ 2eUl7BAVljWEJnpoZe5fLB7vyFe4Ke+yIYcQgX6DaOYzgGw49ZjyV2gN14g8ZVF0VrgU Jj5oinsoKyhS5WerLGLUr4GvxVo1bih4AN+cPajgXKNznygNvEiyqgtnA9fzPjBRaPF7 +MXx5XxS0duJDyp+/vihWpj4/J995KlbcWURIC8ABQcpTAplihOEgChcylLsYiuyotga LpWXZARJhaE24IUIZpA7sl8iLidieuIVJajrMz72Cc9fagwbNyheGDW8JAl/7eDNF0Rj 697g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 202si3927717ywu.140.2018.02.20.01.19.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 20 Feb 2018 01:19:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:54262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo45O-0004pm-LT for patch@linaro.org; Tue, 20 Feb 2018 04:19:42 -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+patch=linaro.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(-) -- 2.14.3 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);