MCPcopy Create free account
hub / github.com/defold/defold / SetThreadName

Function SetThreadName

engine/profiler/src/js/profiler_js.cpp:207–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static ProfileResult SetThreadName(void*, const char* name)
208{
209 CHECK_INITIALIZED_RETVAL(PROFILE_RESULT_NOT_INITIALIZED);
210 DM_MUTEX_SCOPED_LOCK(g_Lock);
211 if (g_ProfileContext->m_ThreadNames.Full())
212 {
213 uint32_t cap = g_ProfileContext->m_ThreadNames.Capacity() + 32;
214 g_ProfileContext->m_ThreadNames.SetCapacity((cap*2)/3, cap);
215 }
216 g_ProfileContext->m_ThreadNames.Put(GetThreadId(), strdup(name));
217 return PROFILE_RESULT_OK;
218}
219
220static ProfileResult FrameBegin(void*)
221{

Callers

nothing calls this directly

Calls 5

GetThreadIdFunction · 0.70
FullMethod · 0.45
CapacityMethod · 0.45
SetCapacityMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected