| 2204 | } |
| 2205 | |
| 2206 | BFP_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 | |
| 2227 | BFP_EXPORT void BFP_CALLTYPE BfpThread_GetName(BfpThread* thread, char* outName, int* inOutNameSize, BfpThreadResult* outResult) |
| 2228 | { |
no test coverage detected