chrt: don't assume SCHED_BATCH and SCHED_IDLE exist
SCHED_FIFO, SCHED_OTHER, SCHED_RR are part of POSIX 1003.1b Process
Scheduling, so it is correct to assume they always exists.
SCHED_BATCH and SCHED_IDLE are Linux specific, we should not assume
they exists.
Defining SCHED_BATCH and SCHED_IDLE to random values (ie the ones found
on Linux systems) is not an option as they may *collide* with the one of
other systems. For example on GNU/kFreeBSD we have:
#define SCHED_RR 3
and on Linux we have:
#define SCHED_BATCH 3
[kzak@redhat.com: - add "Linux specific" notes to chrt.1
- add a note about BATCH and PR conflict to
this commit message]
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Karel Zak <kzak@redhat.com>