MCPcopy Create free account
hub / github.com/beefytech/Beef / BfpThread_SetName

Function BfpThread_SetName

BeefySysLib/platform/win/Platform.cpp:2206–2225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2204}
2205
2206BFP_EXPORT void BFP_CALLTYPE BfpThread_SetName(BfpThread* thread, const char* name, BfpThreadResult* outResult)
2207{
2208 ImportKernel();
2209
2210 HANDLE hThread = (HANDLE)thread;
2211 if (hThread == NULL)
2212 hThread = ::GetCurrentThread();
2213
2214 if (gSetThreadDescription != NULL)
2215 {
2216 gSetThreadDescription(hThread, UTF8Decode(name).c_str());
2217
2218 OUTRESULT(BfpThreadResult_Ok);
2219 return;
2220 }
2221
2222 SetThreadName(::GetThreadId(hThread), name);
2223
2224 OUTRESULT(BfpThreadResult_UnknownError);
2225}
2226
2227BFP_EXPORT void BFP_CALLTYPE BfpThread_GetName(BfpThread* thread, char* outName, int* inOutNameSize, BfpThreadResult* outResult)
2228{

Callers 13

WorkerProcThunkMethod · 0.70
WorkerProcThunkMethod · 0.50
ProcMethod · 0.50
ThreadProcMethod · 0.50
FuzzInitFunction · 0.50
mainFunction · 0.50
CompileThreadFunction · 0.50
DllMainFunction · 0.50
DebugThreadProcMethod · 0.50
RunLoopMethod · 0.50

Calls 3

SetThreadNameFunction · 0.85
ImportKernelFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected