* the kernel and find out the minimal valid cpuset size
* without allocating any memory for the CPU affinity mask.
*/
- pid_t pid = getpid();
cpuset_size = 128;
while (cpuset_size &&
- sched_getaffinity(pid, cpuset_size, NULL) == -1 &&
+ sched_getaffinity(0, cpuset_size, NULL) == -1 &&
EINVAL == errno) {
cpuset_size <<= 1;
}
}
static void
-print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int len)
+print_affinitylist(struct tcb *const tcp, const kernel_ulong_t addr,
+ const unsigned int len)
{
const unsigned int max_size = get_cpuset_size();
const unsigned int umove_size = len < max_size ? len : max_size;