On Wed, Nov 7, 2018 at 10:32 AM Mikael Holmén via Phabricator < revi...@reviews.llvm.org> wrote:
> 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: > Sorry for the breakage here! sched.h comes from glibc, rather than GCC. SCHED_IDLE was added in glibc 2.12, which is considerably older than any supported compiler (2010, vs 2013 for gcc 4.8 and 2016 for gcc 5.4). I don't think there's a documented policy on libc versions... what does this system look like? (e.g. glibc version, distribution?) (It seems like it would be OK to #ifdef SCHED_IDLE here and do nothing the libc is just too old, but it may mask other problems we'd want to know about). ``` > /* 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 > > > >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits