]> granicus.if.org Git - strace/commit
Fix and enhance decoding of sched_[gs]etaffinity syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 7 Jan 2016 00:31:33 +0000 (00:31 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 7 Jan 2016 02:11:55 +0000 (02:11 +0000)
commit6bf08e3e4a2f1b249bea566fe3e4dc84fb008c11
tree6034366a8e0d0fe22c5c29f6cc1deb635c6aeffd
parent6267e4b0e3bd1ea507bc24ae21e43dde24bcb37a
Fix and enhance decoding of sched_[gs]etaffinity syscalls

Print cpu_set_t as a set of integers, similar to the way
fd_set is printed as a set of descriptors.

* affinity.c: Include <sched.h>.
(get_cpuset_size): New function.
(print_affinitylist): Rewrite using get_cpuset_size and next_set_bit.
(sched_getaffinity, sched_setaffinity): Print first two args as ints.
* NEWS: Mention this enhancement.
* tests/sched_xetaffinity.c: New file.
* tests/sched_xetaffinity.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity.
(TESTS): Add sched_xetaffinity.test.
* tests/.gitignore: Add sched_xetaffinity.

Reported-by: Joe Korty <joe.korty@ccur.com>
NEWS
affinity.c
tests/.gitignore
tests/Makefile.am
tests/sched_xetaffinity.c [new file with mode: 0644]
tests/sched_xetaffinity.test [new file with mode: 0755]