[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var |
Date: |
Tue, 06 Dec 2011 12:43:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Am 06.12.2011 12:01, schrieb Stefan Hajnoczi:
> From: Jan Kiszka <address@hidden>
>
> 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
>
> Signed-off-by: Jan Kiszka <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> 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 7246a67..9d78715 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
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH 09/19] fix spelling in hw sub directory, (continued)
- [Qemu-devel] [PATCH 09/19] fix spelling in hw sub directory, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 02/19] console: Fix console_putchar() for CSI J, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 06/19] net/socket.c : fix memory leak, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 07/19] win32: fix memory leak, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 03/19] console: Fix qemu_default_pixelformat() for 24 bpp, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 13/19] Convert keymap file to U TF-8 encoding, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 11/19] configure: Pull linux-headers/asm symlink creation out of loop, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 12/19] Convert source files to UTF-8 encoding, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 14/19] linux-user/cpu-uname.c : Convert to UTF-8, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var, Stefan Hajnoczi, 2011/12/06
- Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var,
Andreas Färber <=
- [Qemu-devel] [PATCH 15/19] linux-user/arm/nwfpe/fpo pcode.h: Fix non-UTF-8 characters, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 17/19] linux-user/syscall.c: Don't skip stracing for fcntl64 failure case, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 18/19] memory: minor documentation fixes/enhancements, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 19/19] mips_malta: resolve endless loop when loading bios, Stefan Hajnoczi, 2011/12/06
- [Qemu-devel] [PATCH 01/19] console: Clean up confusing indentation in console_putchar(), Stefan Hajnoczi, 2011/12/06
- Re: [Qemu-devel] [PULL 00/19] Trivial patches for 3 to 6 December 2011, Stefan Hajnoczi, 2011/12/14