Commit Graph

11 Commits

Author SHA1 Message Date
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
d4bb4510ba affinity: change address argument type from unsigned long to kernel_ureg_t
* affinity.c (print_affinitylist): Change address argument type from
unsigned long to kernel_ureg_t.
2016-12-23 19:26:57 +00:00
58d8f96c25 affinity: pass 0 as a pid to sched_getaffinity
* affinity.c (get_cpuset_size): Pass 0 instead of getpid()
to sched_getaffinity.
2016-12-05 03:56:17 +00:00
cec2dc2ab5 affinity: document the method of finding out the cpuset size
* affinity.c (get_cpuset_size): Add a comment about sched_getaffinity.
2016-12-05 03:56:17 +00:00
Eugene Syromyatnikov
2432f78415 affinity: print cpu set as an array
* affinity.c: Add comma between elements of cpu set.
* tests/sched_xetaffinity.c (main): Update expected output.
2016-12-01 00:08:06 +00:00
6bf08e3e4a 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>
2016-01-07 02:11:55 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
8aa2a81233 affinity.c: make use of RVAL_DECODED
* affinity.c (sys_sched_setaffinity): Update for RVAL_DECODED.
2015-07-20 22:03:07 +00:00
a52375f748 affinity.c: use printaddr and umove_or_printaddr
* affinity.c (print_affinitylist): Use printaddr and umove_or_printaddr.
(sys_sched_getaffinity): Remove redundant u_rval check.
2015-07-20 22:03:07 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
b94b9834fd process.c: move sched_setaffinity and sched_getaffinity parsers to a separate file
* affinity.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_sched_setaffinity, sys_sched_getaffinity): Move
to affinity.c.
2014-12-11 19:25:02 +00:00