Re: [chrony-dev] [PATCH] Use pthread_setschedparam instead of sched_setscheduler

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, Apr 04, 2019 at 05:59:28PM -0400, Stefan R. Filipek wrote:
> Hi,
> 
> I ran into an issue with musl libc on Linux where sched_setscheduler
> isn't implemented. Overall, it seems that pthread_setschedparam is
> more widely supported across different C libraries and OSs. For
> chrony's purposes on Linux, it should make no difference which call is
> used.

Ok. Makes sense.

> Below is the simplest diff I could make, but cleaning up the
> dependency check for pthreads is probably in order. I could also work
> on a more general patch that brings real-time scheduling to any posix
> platform.

If there was a single function working on all supported systems, that
would be nice.

>    test_code \
> -    'sched_setscheduler()' \
> +    'pthread_setschedparam()' \
>      'sched.h' '' '' '

sched.h should be pthread.h?

Otherwise, the patches look good to me. Can you please squash them and
send as a patch I could apply with your name as the author and a
commit message.

Thanks,

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/