Re: [PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Sam McCall via cfe-commits
Appreciate the input from everyone. This is an experimental feature that isn't hooked up anywhere yet, linux/glibc-only is fine for now. We can revisit once this code is actually used. (BTW musl seems to work fine: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_setschedparam.c) On Fr

[PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I don't even know if this actually does any good. In some libc implementations `pthread_setschedparam` may be a no-op (e.g. in musl) Repository: rL LLVM https://reviews.llvm.org/D53922 ___ cfe-commits mailing list cfe-co

Re: [PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Sam McCall via cfe-commits
Yes, that's the intent, at least for now. Fine to eat all your cores, but background indexing isn't higher priority than anything else. On Fri, Nov 2, 2018 at 8:35 PM Joerg Sonnenberger wrote: > On Wed, Oct 31, 2018 at 08:53:03AM +, Sam McCall via Phabricator via > cfe-commits wrote: > > sam

Re: [PATCH] D53922: [clangd] fix non linux build

2018-11-02 Thread Joerg Sonnenberger via cfe-commits
On Wed, Oct 31, 2018 at 08:53:03AM +, Sam McCall via Phabricator via cfe-commits wrote: > sammccall accepted this revision. > sammccall added a comment. > This revision is now accepted and ready to land. > > Thanks! > We should work out what to do on BSD+Mac (and windows at some point), but

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D53922#1281914, @sammccall wrote: > Thanks. I was replying to your suggestion for NetBSD though - my reading of > the docs says your "low" suggestion would end up being a very high priority. > Is this not the case? Can you suggest a bette

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D53922#1281902, @krytarowski wrote: > In https://reviews.llvm.org/D53922#1281898, @sammccall wrote: > > > In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > > > > > For NetBSD: > > > > > > - `ThreadPriority::Low` select either

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. I thought applying this sort of change for BSD but SCHED_IDLE is a GNU extension and does not have equivalence per see. Repository: rL LLVM https://reviews.llvm.org/D53922 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D53922#1281898, @sammccall wrote: > In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > > > For NetBSD: > > > > - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call > > sched_get_priority_min() and set pthre

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > For NetBSD: > > - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call > sched_get_priority_min() and set pthread_setschedparam(). https://www.netbsd.org/docs/internals/en/chap-processe

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. For NetBSD: - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call sched_get_priority_min() and set pthread_setschedparam(). - `ThreadPriority::Normal` use SCHED_OTHER with `PRI_NONE`. Repository: rL LLVM https://reviews.llvm.org/D53922 __

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345700: [clangd] fix non linux build (authored by devnexen, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53922?vs=171870&id=171873#toc Rep

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! We should work out what to do on BSD+Mac (and windows at some point), but no-op is good for now. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53922 ___

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added reviewers: kadircet, sammccall. devnexen created this object with visibility "All Users". Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov, krytarowski. There is no SCHED_IDLE semantic equivalent in BSD sy