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:
@@ -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__
|
||||
@@ -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 )
|
||||
|
||||
@@ -18,6 +18,8 @@ extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void
|
||||
#include <stdint.h>
|
||||
#include <thread>
|
||||
|
||||
#include "TracyApi.h"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user