[llvm] Windows: use EcoQoS for ThreadPriority::Background (PR #148797)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 11:49:12 PDT 2025
================
@@ -107,6 +107,31 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
}
SetThreadPriorityResult llvm::set_thread_priority(ThreadPriority Priority) {
+
+ typedef BOOL(WINAPI * SetThreadInformation_t)(
+ HANDLE hThread, THREAD_INFORMATION_CLASS ThreadInformationClass,
+ _In_reads_bytes_(ThreadInformationSize) PVOID ThreadInformation,
+ ULONG ThreadInformationSize);
+ static const auto pfnSetThreadInformation =
----------------
mstorsjo wrote:
I think the intent of using `GetProcAddress` here is so that we don't have a hard dependency on the symbol being present. LLVM currently works down to Windows 7, while this function only is available since Windows 8.
https://github.com/llvm/llvm-project/pull/148797
More information about the llvm-commits
mailing list