[cfe-commits] r166466 - /cfe/trunk/tools/libclang/CIndex.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Oct 22 21:09:39 PDT 2012


Author: akirtzidis
Date: Mon Oct 22 23:09:38 2012
New Revision: 166466

URL: http://llvm.org/viewvc/llvm-project?rev=166466&view=rev
Log:
[libclang] Add an environment variable to disable thread background priotity, for testing

Modified:
    cfe/trunk/tools/libclang/CIndex.cpp

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=166466&r1=166465&r2=166466&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Mon Oct 22 23:09:38 2012
@@ -6137,6 +6137,9 @@
 }
 
 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);





More information about the cfe-commits mailing list