1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Merged in rokups/tracy/dllimport-cleanup (pull request #36)

Clean up imported functions in multi-dll projects.

Approved-by: Till Rathmann <till.rathmann@gmx.de>
This commit is contained in:
Rokas K. (rku)
2019-06-11 15:04:34 +00:00
committed by Bartosz Taudul
9 changed files with 56 additions and 136 deletions
+14
View File
@@ -0,0 +1,14 @@
#ifndef __TRACYAPI_H__
#define __TRACYAPI_H__
#ifdef _WIN32
# if defined TRACY_IMPORTS
# define TRACY_API __declspec(dllimport)
# else
# define TRACY_API __declspec(dllexport)
# endif
#else
# define TRACY_API __attribute__((visibility("default")))
#endif
#endif // __TRACYAPI_H__
+2 -2
View File
@@ -44,8 +44,8 @@ struct ThreadNameData
const char* name;
ThreadNameData* next;
};
std::atomic<ThreadNameData*>& GetThreadNameData();
void InitRPMallocThread();
TRACY_API std::atomic<ThreadNameData*>& GetThreadNameData();
TRACY_API void InitRPMallocThread();
#endif
void SetThreadName( std::thread& thread, const char* name )
+2
View File
@@ -18,6 +18,8 @@ extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void
#include <stdint.h>
#include <thread>
#include "TracyApi.h"
namespace tracy
{