]> git.ipfire.org Git - thirdparty/util-linux.git/commit
chrt: make threads aware
authorDavidlohr Bueso <dave@gnu.org>
Thu, 5 May 2011 12:02:34 +0000 (14:02 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 5 May 2011 12:02:34 +0000 (14:02 +0200)
commit78904e7647fe4feb2f27b23e2f9bbabe364b45b3
tree3cc34ecb4071af77849a79ba51829938edd49fc0
parent86a84a17d29f4d6353f8e5e1b89d292031676265
chrt: make threads aware

Currently this program works only with the master thread. Add a '-t'
option to propagate changes to the entire group of threads.

Example:

root@offworld:~/projects/util-linux/schedutils# ls /proc/2111/task/
2111  2112  2119  2121  2138  2139  2159  2160
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2111
pid 2111's current scheduling policy: SCHED_RR
pid 2111's current scheduling priority: 3
root@offworld:~/projects/util-linux/schedutils# ./chrt -t -p 2 2111
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2112
pid 2112's current scheduling policy: SCHED_RR
pid 2112's current scheduling priority: 2
root@offworld:~/projects/util-linux/schedutils# ./chrt -p 2111
pid 2111's current scheduling policy: SCHED_RR
pid 2111's current scheduling priority: 2

[kzak@redhat.com: - rename -t/--thread to -a/--all-tasks]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/Makefile.am
schedutils/chrt.1
schedutils/chrt.c