2017-09-10 15:46:20 +00:00
|
|
|
#ifndef __TRACYSYSTEM_HPP__
|
|
|
|
#define __TRACYSYSTEM_HPP__
|
|
|
|
|
2017-09-25 19:13:59 +00:00
|
|
|
#include <stdint.h>
|
2017-09-10 15:46:20 +00:00
|
|
|
|
2019-06-07 13:56:46 +00:00
|
|
|
#include "TracyApi.h"
|
|
|
|
|
2017-09-10 15:46:20 +00:00
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
2019-06-25 13:44:49 +00:00
|
|
|
namespace detail
|
|
|
|
{
|
2021-10-07 22:42:52 +00:00
|
|
|
TRACY_API uint32_t GetThreadHandleImpl();
|
2019-06-25 13:44:49 +00:00
|
|
|
}
|
2017-09-25 22:46:46 +00:00
|
|
|
|
2019-06-25 13:44:49 +00:00
|
|
|
#ifdef TRACY_ENABLE
|
2024-08-03 17:33:19 +00:00
|
|
|
struct ThreadNameData
|
|
|
|
{
|
|
|
|
uint32_t id;
|
2024-08-03 17:40:11 +00:00
|
|
|
int32_t groupHint;
|
2024-08-03 17:33:19 +00:00
|
|
|
const char* name;
|
|
|
|
ThreadNameData* next;
|
|
|
|
};
|
|
|
|
|
|
|
|
ThreadNameData* GetThreadNameData( uint32_t id );
|
|
|
|
|
2021-10-07 22:42:52 +00:00
|
|
|
TRACY_API uint32_t GetThreadHandle();
|
2019-06-25 13:44:49 +00:00
|
|
|
#else
|
2021-10-07 22:42:52 +00:00
|
|
|
static inline uint32_t GetThreadHandle()
|
2019-06-25 13:44:49 +00:00
|
|
|
{
|
|
|
|
return detail::GetThreadHandleImpl();
|
|
|
|
}
|
2019-06-24 17:18:52 +00:00
|
|
|
#endif
|
|
|
|
|
2020-01-25 15:17:03 +00:00
|
|
|
TRACY_API void SetThreadName( const char* name );
|
2024-08-03 17:40:11 +00:00
|
|
|
TRACY_API void SetThreadNameWithHint( const char* name, int32_t groupHint );
|
2021-10-07 22:42:52 +00:00
|
|
|
TRACY_API const char* GetThreadName( uint32_t id );
|
2017-09-10 15:46:20 +00:00
|
|
|
|
2023-12-20 12:15:42 +00:00
|
|
|
TRACY_API const char* GetEnvVar( const char* name );
|
2021-04-09 22:33:01 +00:00
|
|
|
|
2017-09-10 15:46:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|