diff options
author | Karel Zak | 2007-04-11 23:18:08 +0200 |
---|---|---|
committer | Karel Zak | 2007-04-11 23:18:08 +0200 |
commit | 09dd84cac7fbc4886fdb92593898ea713f663dfd (patch) | |
tree | 2e85782d329074dee1896e1194ba25330d7f66ce | |
parent | check exit status of autotools (diff) | |
download | kernel-qcow2-util-linux-09dd84cac7fbc4886fdb92593898ea713f663dfd.tar.gz kernel-qcow2-util-linux-09dd84cac7fbc4886fdb92593898ea713f663dfd.tar.xz kernel-qcow2-util-linux-09dd84cac7fbc4886fdb92593898ea713f663dfd.zip |
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>
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | schedutils/chrt.1 | 6 | ||||
-rw-r--r-- | schedutils/chrt.c | 7 |
3 files changed, 14 insertions, 2 deletions
@@ -30,3 +30,6 @@ - rewrite ipcs to use /proc/sys/kernel rather than unreliable syscalls (there are problems with 32bit userspace on 64bit kernel) + +- remove support for old system headers (like missing ioctls, ..) + * check for SCHED_BATCH in the configure script diff --git a/schedutils/chrt.1 b/schedutils/chrt.1 index 9ffc084b5..f6db1cbe3 100644 --- a/schedutils/chrt.1 +++ b/schedutils/chrt.1 @@ -42,13 +42,15 @@ runs COMMAND with the given attributes. Both policy (one of or .BR SCHED_BATCH ) and priority can be set and retrieved. +.PP +The +.BR SCHED_BATCH +policy is supported since Linux 2.6.16. .SH OPTIONS .TP .B -p, --pid operate on an existing PID and do not launch a new task .TP - -.TP .B -b, --batch set scheduling policy to .BR SCHED_BATCH diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 4c190a82d..02ff3809c 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -30,6 +30,13 @@ #include <getopt.h> #include <errno.h> +/* the SCHED_BATCH is supported since Linux 2.6.16 + * -- temporary workaround for people with old glibc headers + */ +#ifndef SCHED_BATCH +# define SCHED_BATCH 3 +#endif + static void show_usage(const char *cmd) { fprintf(stderr, "chrt (%s)\n", PACKAGE_STRING); |