blob: 56c74a693a7dc75439768d23df57b2ebb385ec1f [file] [log] [blame]
Paolo Bonzini62963f02011-08-16 10:37:44 -07001/*
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
21static inline size_t tls_init(size_t size, size_t alignment) { return 0; }
22static inline void tls_init_thread(void) {}
23
24#endif