winpr/{libwinpr/thread/thread.c,include/winpr/thread.h}: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF.

This commit is contained in:
Mike Gabriel 2022-03-08 08:37:46 +01:00 committed by Bernhard Miklautz
parent 024f7fa4d6
commit d337ea9c16
2 changed files with 2 additions and 5 deletions

View File

@ -248,10 +248,7 @@ extern "C"
/* CommandLineToArgvA is not present in the original Windows API, WinPR always exports it */
WINPR_API LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs);
#if defined(WITH_DEBUG_THREADS)
WINPR_API VOID DumpThreadHandles(void);
#endif
#ifdef __cplusplus
}

View File

@ -814,9 +814,9 @@ BOOL TerminateThread(HANDLE hThread, DWORD dwExitCode)
return TRUE;
}
#if defined(WITH_DEBUG_THREADS)
VOID DumpThreadHandles(void)
{
#if defined(WITH_DEBUG_THREADS)
char** msg;
size_t used, i;
void* stack = winpr_backtrace(20);
@ -879,6 +879,6 @@ VOID DumpThreadHandles(void)
#endif
WLog_DBG(TAG, "---------------- End Dumping thread handles -------------");
#endif
}
#endif
#endif