]> granicus.if.org Git - clang/commitdiff
[libclang] Add an environment variable to disable thread background priotity, for...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Oct 2012 04:09:38 +0000 (04:09 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Oct 2012 04:09:38 +0000 (04:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166466 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index 23d0768413e1af16e832eea51130619864d150b4..f3c91e31b4da5bd8668dc4655cf82d10b4b12679 100644 (file)
@@ -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);