Paolo Bonzini | 62963f0 | 2011-08-16 10:37:44 -0700 | [diff] [blame] | 1 | /* |
| 2 | * TLS with __thread |
| 3 | * |
| 4 | * Copyright Red Hat, Inc. 2011 |
| 5 | * |
| 6 | * Authors: |
| 7 | * Paolo Bonzini <pbonzini@us.ibm.com> |
| 8 | * |
| 9 | * This work is licensed under the terms of the GNU GPL, version 2. See |
| 10 | * the COPYING file in the top-level directory. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef QEMU_TLS_GCC_H |
| 15 | #define QEMU_TLS_GCC_H |
| 16 | |
| 17 | #define DECLARE_TLS(type, x) extern DEFINE_TLS(type, x) |
| 18 | #define DEFINE_TLS(type, x) __thread __typeof__(type) tls__##x |
| 19 | #define get_tls(x) tls__##x |
| 20 | |
| 21 | static inline size_t tls_init(size_t size, size_t alignment) { return 0; } |
| 22 | static inline void tls_init_thread(void) {} |
| 23 | |
| 24 | #endif |