[PATCH] D60867: [clang][CIndex] Use llvm::set_thread_priority

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 06:25:15 PDT 2019


kadircet created this revision.
kadircet added reviewers: jkorous, gribozavr.
Herald added subscribers: cfe-commits, arphaman, dexonsmith.
Herald added a project: clang.

Repository:
  rC Clang

https://reviews.llvm.org/D60867

Files:
  tools/libclang/CIndex.cpp


Index: tools/libclang/CIndex.cpp
===================================================================
--- tools/libclang/CIndex.cpp
+++ tools/libclang/CIndex.cpp
@@ -8723,9 +8723,7 @@
   if (getenv("LIBCLANG_BGPRIO_DISABLE"))
     return;
 
-#ifdef USE_DARWIN_THREADS
-  setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);
-#endif
+  llvm::set_thread_priority(llvm::ThreadPriority::Background);
 }
 
 void cxindex::printDiagsToStderr(ASTUnit *Unit) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60867.195725.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190418/bcbe5505/attachment.bin>


More information about the cfe-commits mailing list