]> git.ipfire.org Git - thirdparty/util-linux.git/commit
chrt: Use sched_setscheduler system call directly
authorjonnyh64 <60403537+jonnyh64@users.noreply.github.com>
Wed, 29 Jan 2020 21:24:16 +0000 (22:24 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 30 Jan 2020 09:45:32 +0000 (10:45 +0100)
commitfcc3078754291d2f5121797eb91b364f8e24b2f1
treebccc6ae4970553b58088ccacd901a20dc139a8cb
parentcaa37b6e18fdcd29e57ab82fe1d54b293fccbf3b
chrt: Use sched_setscheduler system call directly

musl libc does not support the sched_setscheduler library function
because the underlying Linux system call does not confirm to Posix;
this patch makes chrt use the system call directly

[kzak@redhat.com:
    - note that musl libc implements sched_setscheduler()
      but returns -ENOSYS all time...
    - add ifdefs to the patch
    - make sure we include syscall.h]

References: http://git.musl-libc.org/cgit/musl/commit/src/sched/sched_setscheduler.c?id=1e21e78bf7a5c24c217446d8760be7b7188711c2
Addresses: https://github.com/karelzak/util-linux/issues/943
Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/chrt.c