thread local for MSVC

This commit is contained in:
Krasimir Angelov
2023-01-25 23:16:02 +01:00
parent e4cc9bc0a7
commit 696a9ffb16
2 changed files with 11 additions and 1 deletions

View File

@@ -5,8 +5,13 @@
class PgfDB;
#if defined(_MSC_VER)
extern PGF_INTERNAL_DECL __declspec( thread ) unsigned char* current_base;
extern PGF_INTERNAL_DECL __declspec( thread ) PgfDB* current_db;
#else
extern PGF_INTERNAL_DECL __thread unsigned char* current_base __attribute__((tls_model("initial-exec")));
extern PGF_INTERNAL_DECL __thread PgfDB* current_db __attribute__((tls_model("initial-exec")));
#endif
struct block_descr;
struct malloc_state;