diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-23 08:18:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 08:18:52 +0200 |
commit | 2409fedacfeb36dd36f1d815f58a5834eb6f0504 (patch) | |
tree | b9253bfc4098fc9c366c6c82f3d2a0bb73fe0b85 /externals/microprofile/microprofile.h | |
parent | Merge pull request #3677 from FernandoS27/better-sync (diff) | |
parent | CMakeLists: Make missing declarations a compile-time error (diff) | |
download | yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar.gz yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar.bz2 yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar.lz yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar.xz yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.tar.zst yuzu-2409fedacfeb36dd36f1d815f58a5834eb6f0504.zip |
Diffstat (limited to '')
-rw-r--r-- | externals/microprofile/microprofile.h | 20 |
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*); #ifndef _WIN32 typedef pthread_t MicroProfileThread; -void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) +inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) { pthread_attr_t Attr; int r = pthread_attr_init(&Attr); MP_ASSERT(r == 0); pthread_create(pThread, &Attr, Func, 0); } -void MicroProfileThreadJoin(MicroProfileThread* pThread) +inline void MicroProfileThreadJoin(MicroProfileThread* pThread) { int r = pthread_join(*pThread, 0); MP_ASSERT(r == 0); @@ -930,11 +930,11 @@ DWORD _stdcall ThreadTrampoline(void* pFunc) return (uint32_t)F(0); } -void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) +inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) { *pThread = CreateThread(0, 0, ThreadTrampoline, Func, 0, 0); } -void MicroProfileThreadJoin(MicroProfileThread* pThread) +inline void MicroProfileThreadJoin(MicroProfileThread* pThread) { WaitForSingleObject(*pThread, INFINITE); CloseHandle(*pThread); @@ -1131,7 +1131,7 @@ inline void MicroProfileSetThreadLog(MicroProfileThreadLog* pLog) pthread_setspecific(g_MicroProfileThreadLogKey, pLog); } #else -MicroProfileThreadLog* MicroProfileGetThreadLog() +inline MicroProfileThreadLog* MicroProfileGetThreadLog() { return g_MicroProfileThreadLog; } @@ -1247,7 +1247,7 @@ MicroProfileToken MicroProfileFindToken(const char* pGroup, const char* pName) return MICROPROFILE_INVALID_TOKEN; } -uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type) +inline uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type) { for(uint32_t i = 0; i < S.nGroupCount; ++i) { @@ -1276,7 +1276,7 @@ uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type) return nGroupIndex; } -void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor) +inline void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor) { int nCategoryIndex = -1; for(uint32_t i = 0; i < S.nCategoryCount; ++i) @@ -1442,7 +1442,7 @@ void MicroProfileGpuLeave(MicroProfileToken nToken_, uint64_t nTickStart) } } -void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch) +inline void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch) { if(S.nRunning || pContextSwitch->nTicks <= S.nPauseTicks) { @@ -1894,7 +1894,7 @@ void MicroProfileSetEnableAllGroups(bool bEnableAllGroups) S.nAllGroupsWanted = bEnableAllGroups ? 1 : 0; } -void MicroProfileEnableCategory(const char* pCategory, bool bEnabled) +inline void MicroProfileEnableCategory(const char* pCategory, bool bEnabled) { int nCategoryIndex = -1; for(uint32_t i = 0; i < S.nCategoryCount; ++i) @@ -2004,7 +2004,7 @@ void MicroProfileForceDisableGroup(const char* pGroup, MicroProfileTokenType Typ } -void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize) +inline void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize) { for(uint32_t i = 0; i < S.nTotalTimers && i < nSize; ++i) { |