Skip to content

Commit

Permalink
Rename get_tls to tls_var
Browse files Browse the repository at this point in the history
get_tls() can serve as a lvalue as well, so 'get' might be confusing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
  • Loading branch information
jan-kiszka authored and Stefan Hajnoczi committed Dec 6, 2011
1 parent 75dfbc1 commit 4a2dd92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpu-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions qemu-tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4a2dd92

Please sign in to comment.