Commit Graph

10 Commits

Author SHA1 Message Date
Aurelien Jarno b64279dab8 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>
2009-05-07 11:28:08 +02:00
Karel Zak 6c00cbbe97 chrt: output buglet when reporting scheduling class
% chrt -i 0 ./a.out &
[1] 60479
% chrt -p 60479
pid 60479's current scheduling policy: SCHED_IDLE
SCHED_RR
pid 60479's current scheduling priority: 0

We have a spurious and incorrect SCHED_RR in there...

Address-Red-Hat-Bugzilla: #483706
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-03 10:22:07 +01:00
Karel Zak bd9d9f05e6 chrt: add NLS support, clean error messages and return codes
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-23 23:33:10 +02:00
Martin Steigerwald c779d6e94f chrt: support CFS SCHED_IDLE priority and document it
Signed-off-by: Martin Steigerwald <ms@teamix.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-23 23:28:00 +02:00
Karel Zak bf928360f2 build-sys: remove hardcoded _GNU_SOURCE
We have AC_GNU_SOURCE, so we needn't any extra hardcoded _GNU_SOURCE.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-20 00:57:01 +02:00
Matthias Koenig 697d58e867 schedutils: fix chrt docs and pid=0 usage
Fix some documentation bugs for chrt.
Make it work with PID 0, which means current process.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2007-07-16 15:12:36 +02:00
Karel Zak 09dd84cac7 schedutils: define SCHED_BATCH when compile with old glibc
This is temporary workaround and it will be removed in 2.14 when
minimal number of people will use old systems where is not defined
SCHED_BATCH in (bits/)sched.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-11 23:18:08 +02:00
Karel Zak df3773fba0 schedutils: add support for SCHED_BATCH
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-16 15:24:13 +01:00
Karel Zak baf39af15b Imported from util-linux-2.13-pre2 tarball. 2006-12-07 00:26:58 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00