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>
diff --git a/NEWS b/NEWS
index f66d321..03c64a8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,8 @@
===============================================
* Improvements
- * Enhanced decoding of personality syscall.
+ * Enhanced decoding of personality, sched_getaffinity,
+ and sched_setaffinity syscalls.
* Bug fixes
* Fixed build on arc, metag, nios2, or1k, and tile architectures.