This commit is contained in:
Krzosa Karol
2025-01-11 20:52:44 +01:00
parent b81297450b
commit 16125f5605
3 changed files with 37 additions and 28 deletions

View File

@@ -110,13 +110,13 @@ typedef double f64;
#define debug_break() (debug__break(), 0)
#if PLATFORM_WASM
#define THREAD_LOCAL
#define gb_thread
#elif PLATFORM_GCC | PLATFORM_CLANG
#define THREAD_LOCAL __thread
#define gb_thread __thread
#elif PLATFORM_CL
#define THREAD_LOCAL __declspec(thread)
#define gb_thread __declspec(thread)
#else
#define THREAD_LOCAL _Thread_local
#define gb_thread _Thread_local
#endif
#if PLATFORM_CL

View File

@@ -13,7 +13,7 @@ struct thread_ctx_t {
logger_t log;
};
THREAD_LOCAL thread_ctx_t tcx = {
gb_thread thread_ctx_t tcx = {
.log = {
.break_on_fatal = true,
.log_proc = default_log_proc,