[PATCH] D53651: [clangd] Use thread pool for background indexing.
Mikael Holmén via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 7 01:32:07 PST 2018
uabelho added a comment.
Hi,
I've got a post-review comment about the use of SCHED_IDLE vs the needed gcc version.
================
Comment at: clang-tools-extra/trunk/clangd/Threading.cpp:110
+ T.native_handle(),
+ Priority == ThreadPriority::Low ? SCHED_IDLE : SCHED_OTHER, &priority);
+#endif
----------------
I noticed that when I compile this with gcc 5.4.0, I get a compilation error about SCHED_IDLE not being defined.
Indeed, if I look in sched.h used with gcc 5.4.0, these are the SCHED_* definitions:
```
/* Scheduling algorithms. */
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#ifdef __USE_GNU
# define SCHED_BATCH 3
#endif
```
I suppose SCHED_IDLE was added in some later version...
On
https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library
it says that gcc 4.8 should work, but it doesn't now then?
Repository:
rL LLVM
https://reviews.llvm.org/D53651
More information about the cfe-commits
mailing list