util-linux/schedutils
Davidlohr Bueso 42708f12f0 taskset: make threads aware
Add a new '-a' option to view/modify the CPU affinity for an entire
group of threads belonging to a given PID.  We create two new
functions, print_affinity() and do_taskset() for code simplification.

Example:

zeus@jilguero:~/src/util-linux/schedutils$ ./taskset -a -p 01 3142
pid 3142's current affinity mask: 2
pid 3142's new affinity mask: 1
pid 3164's current affinity mask: 2
pid 3164's new affinity mask: 1
pid 854's current affinity mask: 2
pid 854's new affinity mask: 1

[kzak@redhat.com: - clean up
                  - move variables to struct taskset]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Tested-by: Jonathan Gonzalez <zeus@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-11 16:17:56 +02:00
..
.gitignore build-sys: ignore a bunch of generated files, mostly binaries 2008-04-14 14:08:00 +02:00
Makefile.am chrt: make threads aware 2011-05-05 14:02:34 +02:00
chrt.1 chrt.1: fix grammar 2011-05-10 14:21:33 +02:00
chrt.c chrt: allow to use --all-tasks when retrieve info 2011-05-05 14:23:38 +02:00
ionice.1 schedutils: fix typos 2011-01-17 15:26:35 +01:00
ionice.c build-sys: provide alternatives for err, errx, warn and warnx 2011-02-14 17:45:24 +01:00
taskset.1 taskset: make threads aware 2011-05-11 16:17:56 +02:00
taskset.c taskset: make threads aware 2011-05-11 16:17:56 +02:00