[PATCH] D58492: [clangd] Add thread priority lowering for MacOS as well
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 21 04:48:36 PST 2019
ilya-biryukov added a reviewer: gribozavr.
ilya-biryukov added a subscriber: gribozavr.
ilya-biryukov added a comment.
Not an expert on MacOS threading APIs, only checked this builds on Mac.
@gribozavr could you confirm using these APIs is the right thing to do on Mac?
================
Comment at: clangd/Threading.cpp:126
+ // https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getpriority.2.html
+ setpriority(PRIO_DARWIN_THREAD, 0,
+ Priority == ThreadPriority::Low && !AvoidThreadStarvation
----------------
Could you add a corresponding #include directive on Mac (`#include <sys/resource.h>`)?
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58492/new/
https://reviews.llvm.org/D58492
More information about the cfe-commits
mailing list