Changeset View
Changeset View
Standalone View
Standalone View
source/ps/Profiler2.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* The initial setup of g_Profiler2 must happen in the game's main thread. | * The initial setup of g_Profiler2 must happen in the game's main thread. | ||||
* RegisterCurrentThread and the Record functions may be called from any thread. | * RegisterCurrentThread and the Record functions may be called from any thread. | ||||
* The HTTP server runs its own threads, which may call the ConstructJSON functions. | * The HTTP server runs its own threads, which may call the ConstructJSON functions. | ||||
*/ | */ | ||||
#ifndef INCLUDED_PROFILER2 | #ifndef INCLUDED_PROFILER2 | ||||
#define INCLUDED_PROFILER2 | #define INCLUDED_PROFILER2 | ||||
Stan: Adding "lib/posix/posix_pthread.h" fixes the build for me. | |||||
#include "lib/timer.h" | #include "lib/timer.h" | ||||
#include "ps/ThreadUtil.h" | #include "ps/ThreadUtil.h" | ||||
struct mg_context; | struct mg_context; | ||||
// Note: Lots of functions are defined inline, to hypothetically | // Note: Lots of functions are defined inline, to hypothetically | ||||
// minimise performance overhead. | // minimise performance overhead. | ||||
▲ Show 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | private: | ||||
int m_FrameNumber; | int m_FrameNumber; | ||||
mg_context* m_MgContext; | mg_context* m_MgContext; | ||||
pthread_key_t m_TLS; | pthread_key_t m_TLS; | ||||
CProfiler2GPU* m_GPU; | CProfiler2GPU* m_GPU; | ||||
CMutex m_Mutex; | std::mutex m_Mutex; | ||||
std::vector<ThreadStorage*> m_Threads; // thread-safe; protected by m_Mutex | std::vector<ThreadStorage*> m_Threads; // thread-safe; protected by m_Mutex | ||||
}; | }; | ||||
extern CProfiler2 g_Profiler2; | extern CProfiler2 g_Profiler2; | ||||
/** | /** | ||||
* Scope-based enter/leave helper. | * Scope-based enter/leave helper. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Adding "lib/posix/posix_pthread.h" fixes the build for me.