From: Argyrios Kyrtzidis Date: Tue, 23 Oct 2012 04:09:38 +0000 (+0000) Subject: [libclang] Add an environment variable to disable thread background priotity, for... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28f3a0e49132038be9c4c683338859ed03e94263;p=clang [libclang] Add an environment variable to disable thread background priotity, for testing git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166466 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 23d0768413..f3c91e31b4 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -6137,6 +6137,9 @@ void SetSafetyThreadStackSize(unsigned Value) { } void clang::setThreadBackgroundPriority() { + if (getenv("LIBCLANG_BGPRIO_DISABLE")) + return; + // FIXME: Move to llvm/Support and make it cross-platform. #ifdef __APPLE__ setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);