qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Rename get_tls to tls_var
@ 2011-12-05 14:18 Jan Kiszka
  2011-12-05 14:24 ` Paolo Bonzini
  2011-12-06 10:44 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2011-12-05 14:18 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: Paolo Bonzini, Peter Maydell

get_tls() can serve as a lvalue as well, so 'get' might be confusing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 cpu-all.h  |    2 +-
 qemu-tls.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index 5f47ab8..8888016 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -336,7 +336,7 @@ void QEMU_NORETURN cpu_abort(CPUState *env, const char *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)
 
 /* Flags for use in ENV->INTERRUPT_PENDING.
 
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
 
 #endif
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Rename get_tls to tls_var
  2011-12-05 14:18 [Qemu-devel] [PATCH] Rename get_tls to tls_var Jan Kiszka
@ 2011-12-05 14:24 ` Paolo Bonzini
  2011-12-06 10:44 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2011-12-05 14:24 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-trivial, Peter Maydell, qemu-devel

On 12/05/2011 03:18 PM, Jan Kiszka wrote:
> get_tls() can serve as a lvalue as well, so 'get' might be confusing.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> ---
>   cpu-all.h  |    2 +-
>   qemu-tls.h |    4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cpu-all.h b/cpu-all.h
> index 5f47ab8..8888016 100644
> --- a/cpu-all.h
> +++ b/cpu-all.h
> @@ -336,7 +336,7 @@ void QEMU_NORETURN cpu_abort(CPUState *env, const char *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)
>
>   /* Flags for use in ENV->INTERRUPT_PENDING.
>
> 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
>
>   #endif

Good idea.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Rename get_tls to tls_var
  2011-12-05 14:18 [Qemu-devel] [PATCH] Rename get_tls to tls_var Jan Kiszka
  2011-12-05 14:24 ` Paolo Bonzini
@ 2011-12-06 10:44 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-12-06 10:44 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-trivial, Paolo Bonzini, qemu-devel, Peter Maydell

On Mon, Dec 05, 2011 at 03:18:54PM +0100, Jan Kiszka wrote:
> get_tls() can serve as a lvalue as well, so 'get' might be confusing.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  cpu-all.h  |    2 +-
>  qemu-tls.h |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-06 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 14:18 [Qemu-devel] [PATCH] Rename get_tls to tls_var Jan Kiszka
2011-12-05 14:24 ` Paolo Bonzini
2011-12-06 10:44 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).