Skip to contentSkip to conversation

Rename get_tls to tls_var

PATCH Applied Jan Kiszka 3 participants 3 messages Dec 5, 2011 – Dec 6, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Rename get_tls to tls_var

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

---
 cpu-all.h  |    2 +-
 qemu-tls.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
cpu-all.h +1 -1
index 5f47ab8..8888016 100644
@@ -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.
 
qemu-tls.h +2 -2
index 5b70f10..b92ea9d 100644
@@ -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
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 30 lines · Jan Kiszka

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

---
  cpu-all.h  |    2 +-
  qemu-tls.h |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
cpu-all.h +1 -1
index 5f47ab8..8888016 100644
@@ -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.
 
qemu-tls.h +0 -1
index 5b70f10..b92ea9d 100644
@@ -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

qemu-tls.h line 52

Quoted 10 lines
qemu-tls.h +2 -1
+#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