From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXtS3-0004N9-Ji for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:44:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXtRs-0004y7-OR for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:44:47 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37559 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXtRs-0004xd-GZ for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:44:36 -0500 Message-ID: <4EDDFFE3.0@suse.de> Date: Tue, 06 Dec 2011 12:43:31 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1323169274-31657-1-git-send-email-stefanha@linux.vnet.ibm.com> <1323169274-31657-17-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1323169274-31657-17-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org Am 06.12.2011 12:01, schrieb Stefan Hajnoczi: > From: Jan Kiszka >=20 > get_tls() can serve as a lvalue as well, so 'get' might be confusing. Note that this does not work for POSIX pthread_getspecific(), which we'll need to support at some point in time, so I don't think this is a terribly good idea. At least please don't start actually using it as lvalue, we'd need a set_tls() for assignment (in which case get_tls() would've provided nice symmetry). Andreas >=20 > Signed-off-by: Jan Kiszka > Signed-off-by: Stefan Hajnoczi > --- > cpu-all.h | 2 +- > qemu-tls.h | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/cpu-all.h b/cpu-all.h > index 7246a67..9d78715 100644 > --- a/cpu-all.h > +++ b/cpu-all.h > @@ -336,7 +336,7 @@ void QEMU_NORETURN cpu_abort(CPUState *env, const c= har *fmt, ...) > GCC_FMT_ATTR(2, 3); > extern CPUState *first_cpu; > DECLARE_TLS(CPUState *,cpu_single_env); > -#define cpu_single_env get_tls(cpu_single_env) > +#define cpu_single_env tls_var(cpu_single_env) > =20 > /* Flags for use in ENV->INTERRUPT_PENDING. > =20 > diff --git a/qemu-tls.h b/qemu-tls.h > index 5b70f10..b92ea9d 100644 > --- a/qemu-tls.h > +++ b/qemu-tls.h > @@ -41,12 +41,12 @@ > #ifdef __linux__ > #define DECLARE_TLS(type, x) extern DEFINE_TLS(type, x) > #define DEFINE_TLS(type, x) __thread __typeof__(type) tls__##x > -#define get_tls(x) tls__##x > +#define tls_var(x) tls__##x > #else > /* Dummy implementations which define plain global variables */ > #define DECLARE_TLS(type, x) extern DEFINE_TLS(type, x) > #define DEFINE_TLS(type, x) __typeof__(type) tls__##x > -#define get_tls(x) tls__##x > +#define tls_var(x) tls__##x > #endif > =20 > #endif --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg