From patchwork Tue Feb 13 13:22:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 128231 Delivered-To: patches@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4249290ljc; Tue, 13 Feb 2018 05:22:51 -0800 (PST) X-Google-Smtp-Source: AH8x2265qUsrBWmBoykQsu1FXPVqflRP2Y0YWbu1UG6kCWatSDZi998teoSi2KNgQRCtuzBojkuC X-Received: by 10.28.108.4 with SMTP id h4mr1234500wmc.161.1518528171937; Tue, 13 Feb 2018 05:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518528171; cv=none; d=google.com; s=arc-20160816; b=Lrc4/P4jOvXzvGMYGV0XtPcmIj5xaeOFdt70bC9EQneuo1NUqNz26p2bWsnYI8qZGo 0tIb+EGfpTDmZWAAJBpDaVubj7zh6M8gYcacuE8YE5dYi1ltvkIQLdmKBV4pEwVkFL6a qjQtnvjIbXMn0NpEp3Dg5kkXQTWbEIwGiYHXcOaqtFRCuWJYyl6CgWlLXC4FIhtbfcjM BE3gi12C0LvVfam8wx3EFOsu6IElB5dN0tzPDmNNPSo+xMgrfT4pSYLMNxjQUaqielUN Y0IDMMD+cwTehTcjhnaqir3pcPOQsg1NgTBDq5g9ftSGqnNKdyT5Pdblc16PhqeeTpyo Z2jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=rFUx3wa9BceI4Q3P7scxsSgFKB73oUXlDAVrFITObvs=; b=F+cYqO61scAz4tH1r3K1amObsU/rbk1FSrnZAt0xL4Pi7ir16u2L22oMTDKDwYrizx nlcEQ94Nn1H1P4yPdQdZTkDSjX7HtKX+tPTefVftddv785MyC0OK7ckFgkO9r3LRSENi Ddy5LGtXlTdV6T5DsKs8xLKnPi8MqrBle8VDdwjGwqBUKrlR5R4fCRE5xbH2NuZ816iy iEDBRgBLC2M5kymiLNUW4n4HpmMFwxtytuuKnVAakA1lQAAGNdS2IkmgIHVoSqrn0NOT DufLRreyNQhT9lDK1vzutbo/dGEI9mu5JfQCCWwkOFb6h4mUm1RWIssyNGdhaIdSo/2Z rp2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id r141si5378196wmb.155.2018.02.13.05.22.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 05:22:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1elaXn-0008Fi-AO; Tue, 13 Feb 2018 13:22:47 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Richard Henderson , Laurent Vivier , Riku Voipio Subject: [PATCH] linux-user: Remove THREAD macro Date: Tue, 13 Feb 2018 13:22:46 +0000 Message-Id: <20180213132246.26844-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.1 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 --- linux-user/qemu.h | 4 +--- linux-user/main.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) -- 2.16.1 Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson 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); 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) {