summaryrefslogtreecommitdiff
path: root/externals/microprofile/microprofile.h
diff options
context:
space:
mode:
Diffstat (limited to 'externals/microprofile/microprofile.h')
-rw-r--r--externals/microprofile/microprofile.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h
index 9d830f7bf..0c0d0a4d3 100644
--- a/externals/microprofile/microprofile.h
+++ b/externals/microprofile/microprofile.h
@@ -910,14 +910,14 @@ typedef void* (*MicroProfileThreadFunc)(void*);
910 910
911#ifndef _WIN32 911#ifndef _WIN32
912typedef pthread_t MicroProfileThread; 912typedef pthread_t MicroProfileThread;
913void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) 913inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
914{ 914{
915 pthread_attr_t Attr; 915 pthread_attr_t Attr;
916 int r = pthread_attr_init(&Attr); 916 int r = pthread_attr_init(&Attr);
917 MP_ASSERT(r == 0); 917 MP_ASSERT(r == 0);
918 pthread_create(pThread, &Attr, Func, 0); 918 pthread_create(pThread, &Attr, Func, 0);
919} 919}
920void MicroProfileThreadJoin(MicroProfileThread* pThread) 920inline void MicroProfileThreadJoin(MicroProfileThread* pThread)
921{ 921{
922 int r = pthread_join(*pThread, 0); 922 int r = pthread_join(*pThread, 0);
923 MP_ASSERT(r == 0); 923 MP_ASSERT(r == 0);
@@ -930,11 +930,11 @@ DWORD _stdcall ThreadTrampoline(void* pFunc)
930 return (uint32_t)F(0); 930 return (uint32_t)F(0);
931} 931}
932 932
933void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) 933inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
934{ 934{
935 *pThread = CreateThread(0, 0, ThreadTrampoline, Func, 0, 0); 935 *pThread = CreateThread(0, 0, ThreadTrampoline, Func, 0, 0);
936} 936}
937void MicroProfileThreadJoin(MicroProfileThread* pThread) 937inline void MicroProfileThreadJoin(MicroProfileThread* pThread)
938{ 938{
939 WaitForSingleObject(*pThread, INFINITE); 939 WaitForSingleObject(*pThread, INFINITE);
940 CloseHandle(*pThread); 940 CloseHandle(*pThread);
@@ -1131,7 +1131,7 @@ inline void MicroProfileSetThreadLog(MicroProfileThreadLog* pLog)
1131 pthread_setspecific(g_MicroProfileThreadLogKey, pLog); 1131 pthread_setspecific(g_MicroProfileThreadLogKey, pLog);
1132} 1132}
1133#else 1133#else
1134MicroProfileThreadLog* MicroProfileGetThreadLog() 1134inline MicroProfileThreadLog* MicroProfileGetThreadLog()
1135{ 1135{
1136 return g_MicroProfileThreadLog; 1136 return g_MicroProfileThreadLog;
1137} 1137}
@@ -1247,7 +1247,7 @@ MicroProfileToken MicroProfileFindToken(const char* pGroup, const char* pName)
1247 return MICROPROFILE_INVALID_TOKEN; 1247 return MICROPROFILE_INVALID_TOKEN;
1248} 1248}
1249 1249
1250uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type) 1250inline uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type)
1251{ 1251{
1252 for(uint32_t i = 0; i < S.nGroupCount; ++i) 1252 for(uint32_t i = 0; i < S.nGroupCount; ++i)
1253 { 1253 {
@@ -1276,7 +1276,7 @@ uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type)
1276 return nGroupIndex; 1276 return nGroupIndex;
1277} 1277}
1278 1278
1279void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor) 1279inline void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor)
1280{ 1280{
1281 int nCategoryIndex = -1; 1281 int nCategoryIndex = -1;
1282 for(uint32_t i = 0; i < S.nCategoryCount; ++i) 1282 for(uint32_t i = 0; i < S.nCategoryCount; ++i)
@@ -1442,7 +1442,7 @@ void MicroProfileGpuLeave(MicroProfileToken nToken_, uint64_t nTickStart)
1442 } 1442 }
1443} 1443}
1444 1444
1445void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch) 1445inline void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch)
1446{ 1446{
1447 if(S.nRunning || pContextSwitch->nTicks <= S.nPauseTicks) 1447 if(S.nRunning || pContextSwitch->nTicks <= S.nPauseTicks)
1448 { 1448 {
@@ -1894,7 +1894,7 @@ void MicroProfileSetEnableAllGroups(bool bEnableAllGroups)
1894 S.nAllGroupsWanted = bEnableAllGroups ? 1 : 0; 1894 S.nAllGroupsWanted = bEnableAllGroups ? 1 : 0;
1895} 1895}
1896 1896
1897void MicroProfileEnableCategory(const char* pCategory, bool bEnabled) 1897inline void MicroProfileEnableCategory(const char* pCategory, bool bEnabled)
1898{ 1898{
1899 int nCategoryIndex = -1; 1899 int nCategoryIndex = -1;
1900 for(uint32_t i = 0; i < S.nCategoryCount; ++i) 1900 for(uint32_t i = 0; i < S.nCategoryCount; ++i)
@@ -2004,7 +2004,7 @@ void MicroProfileForceDisableGroup(const char* pGroup, MicroProfileTokenType Typ
2004} 2004}
2005 2005
2006 2006
2007void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize) 2007inline void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize)
2008{ 2008{
2009 for(uint32_t i = 0; i < S.nTotalTimers && i < nSize; ++i) 2009 for(uint32_t i = 0; i < S.nTotalTimers && i < nSize; ++i)
2010 { 2010 {