Fixed DLL support.

This commit is contained in:
Till Rathmann 2019-02-20 16:15:13 +01:00
parent 0fd3025a7e
commit 77abc3bffd
2 changed files with 6 additions and 2 deletions

View File

@ -59,14 +59,17 @@ namespace tracy
#endif
#ifdef TRACY_COLLECT_THREAD_NAMES
DLL_IMPORT std::atomic<ThreadNameData*>& get_threadnamedata();
DLL_IMPORT std::atomic<ThreadNameData*>&(*get_getthreadnamedata())();
DLL_IMPORT void(*get_rpmalloc_thread_initialize())();
DLL_IMPORT void(*get_InitRPMallocThread())();
static std::atomic<ThreadNameData*>&(*GetThreadNameData_fpt)() = get_getthreadnamedata();
static void(*rpmalloc_thread_initialize_fpt)() = get_rpmalloc_thread_initialize();
static void(*InitRPMallocThread_fpt)() = get_InitRPMallocThread();
std::atomic<ThreadNameData*>& GetThreadNameData() { return GetThreadNameData_fpt(); }
void rpmalloc_thread_initialize(void) { rpmalloc_thread_initialize_fpt(); }
void InitRPMallocThread() { InitRPMallocThread_fpt(); }
#endif
#ifdef TRACY_ON_DEMAND

View File

@ -889,8 +889,9 @@ DLL_EXPORT int64_t(*get_GetTimeImpl())() { return GetTimeImpl; }
#endif
#ifdef TRACY_COLLECT_THREAD_NAMES
DLL_EXPORT std::atomic<ThreadNameData*>&(*get_threadnamedata())() { return GetThreadNameData; }
DLL_EXPORT std::atomic<ThreadNameData*>&(*get_getthreadnamedata())() { return GetThreadNameData; }
DLL_EXPORT void(*get_rpmalloc_thread_initialize())() { return rpmalloc_thread_initialize; }
DLL_EXPORT void(*get_InitRPMallocThread())() { return InitRPMallocThread; }
#endif
#ifdef TRACY_ON_DEMAND