From patchwork Mon Feb 19 17:10:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 128835 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3734926ljc; Mon, 19 Feb 2018 09:12:19 -0800 (PST) X-Google-Smtp-Source: AH8x227ubx0Y1UGLXSmAxGv6JJK4CSGDm1kcmn3kLlzz71MOGWZUtgMBRowv03EERPntD5fHwf+e X-Received: by 10.37.102.18 with SMTP id a18mr10793492ybc.89.1519060339564; Mon, 19 Feb 2018 09:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519060339; cv=none; d=google.com; s=arc-20160816; b=mmmWr7fAVrSl+Kvsx+3wlJ3eX2iGISSrzUCtu3ttDNS+icMRREaZOaAl7LXbmV1tor /u9MK60fjz1MskqYHv4P708R7owFgw0/6ijW6Fc3bl3wSn76VfB64CjOXSELXdXndMXa F8rxn7d9bw30p0Lo8cFYamJB+zqyI+S0YICWhGhXyWSQ7yxvQWC9ULZDsiIRAfV6wiiO EUx+y1J308KrpWxz0NOg/8lVpvuwQmB0pyXkTQXxctzI7CLAluTRLM+i+Nj+TLpSMdrl 7S/5LemwFKCBqjsV6ezwxn0XQT2XNnc98W2mWqxRRyewatNoj2xdektDc295sPpfUnw1 nNPA== 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=sLW7wIKo2HAMq5OcqER5ii5o3tePlC1eFruv0sNSYr+l4c+5Ze/V1W1mlU0M/AJ5VD glipGarpwtvrQW4HaAtIEZRer/ZVCOr1zSu6Sk6asGbn24aSi2R4s7gZ43xZw2sITnu6 G9Zu6wrG+F7VHtPY3IbFe8HKGdakT24j5XaL5PhrNjRw6vipeYV8u8s/iqmLFFStOH1b Ak9v1HiJorwxNfG1oQ+LFOPRHq7rJ8gTmvzU0b+f5nDikY+v+Mj7xT0IN8qVfe4CS5yp +VFNvv8kf6G/6ROCADfgHq0GLIFnBryPP/1l7km/wI8NFX57ph7l9skXA3UiUPS11Emo QC9Q== 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 g193si360145ywb.784.2018.02.19.09.12.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Feb 2018 09:12:19 -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]:51445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enozC-0005eT-T0 for patch@linaro.org; Mon, 19 Feb 2018 12:12:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enoxs-0004ty-0V for qemu-devel@nongnu.org; Mon, 19 Feb 2018 12:10:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enoxo-0005RW-GV for qemu-devel@nongnu.org; Mon, 19 Feb 2018 12:10:55 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:53607) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enoxo-0005Qa-5v for qemu-devel@nongnu.org; Mon, 19 Feb 2018 12:10:52 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MXRDB-1fJYjX3Rfp-00WCdV; Mon, 19 Feb 2018 18:10:43 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 19 Feb 2018 18:10:33 +0100 Message-Id: <20180219171037.24539-5-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180219171037.24539-1-laurent@vivier.eu> References: <20180219171037.24539-1-laurent@vivier.eu> X-Provags-ID: V03:K0:k246KyJp9PnA8xeNYUFGur4k4uzEtmfoOimz09ygSNuIK2QKNaZ McjCvAOA3JgyyKmw7DJFOJckgLpg1l3qpjSV5LJGCt6jeyt6RMgAwqclgOds2xHfh4ksGcT fZQwZdIjM3AebtQTW2ZCJTbWlL+PJAhTIteNuQzkssQiVWC2l7v35S7/4CE1DCdL4O6DXDU kY5BMHrg7iSMD4FVf9L3w== X-UI-Out-Filterresults: notjunk:1; V01:K0:FwtkJgLn80c=:cNJHD/E27M5LXzXKj27vBJ MVCnUP3OhHUKfg6WbD5w6RgBgrbPhAUJrhPq9VXMKS8olpuNaML3OfAJkVhIwAesH8NDkSEk7 nADw2RJxkdZ1i114+Mo7MBwHCyBlQ6MNytKWweOO7/mccT8d/Yqm3pZbKECTaslclQBL7BPDr Q3Awv3J/lJAL3OLSpLN2ga+vuiZa1p24mfvRidygtbYj2JHD5cOOeHltW/9nPIHBFuiXX63CJ QRrnAN7WMBwA/FB1OnFdiN1dtcWqwXfV9aISON6Z6Tmrk9wEGCRqC4RzFFDRqG9ChtuMILAVV TVPeFU1MrKJ8zgenSx0GKDhtRZungWk0hSGcutiMlZPN7p6PJcMce/oOvOfRAUgsIxbnmFef7 aBU+Il2Mb2H7WFn8efgQl34xH84S4zNeh5KNaDgfwAaVRUF6Pr6+GNfHGUaCeA8QTLK7mPv7U A3Sw6Y9s9sRf6dfw+fxfcv+DKPCFg3DQEg/SV+maWrKC7NxzwhLuCnt71Lbx4u7F1TnbtGsAn QwNUl3MqWf+BYO8M0cj+jMrz+8kSat5CME+bb2z9HQ+XpOIuDKS9T+owV88rryvkJRXYcu07b eRl5LnzwpANT65apKuoW0iaHR4HsSkfFaWOi7lPgijqcALVyikJfB2RS1F2CwzvHyqNquyqk5 aNo4VBaNk6S6ee7coeHRWubdLtJSEN2kGWzEpmYaFvouBcUR8OjBatiH03R58Bk/Nz4LyvHog r1iPFI4ib0S5voDOh/9Lr6JCxRrmoebgtKz3sA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PULL 4/8] 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);