compiler: Add defines for abstracting thread-local storage

This commit is contained in:
Lioncash 2018-03-05 11:59:46 -05:00
parent 9f0393479e
commit 7ec1f12429
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -58,6 +58,9 @@ static union MSVC_FLOAT_HACK __NAN = {{0x00, 0x00, 0xC0, 0x7F}};
#define QEMU_ALIGNED(A, B) __declspec(align(A)) B
// Unicorn: Addition for thread-local variables
#define QEMU_THREAD_LOCAL_VAR __declspec(thread)
#define cat(x,y) x ## y
#define cat2(x,y) cat(x,y)
@ -120,6 +123,9 @@ static union MSVC_FLOAT_HACK __NAN = {{0x00, 0x00, 0xC0, 0x7F}};
#define QEMU_ALIGNED(A, B) B __attribute__((aligned(A)))
// Unicorn: Addition for thread-local variables
#define QEMU_THREAD_LOCAL_VAR __thread
#ifndef glue
#define xglue(x, y) x ## y
#define glue(x, y) xglue(x, y)