Lines Matching refs:pid
38 #define sched_setaffinity(pid, size, cpuset) \ argument
39 syscall(__NR_sched_setaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
40 #define sched_getaffinity(pid, size, cpuset) \ argument
41 syscall(__NR_sched_getaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
46 static void do_taskset(pid_t pid, int quiet) in do_taskset() argument
56 if (-1 == sched_getaffinity(pid, sizeof(toybuf), (void *)mask)) in do_taskset()
57 perror_exit(failed, "get", pid); in do_taskset()
59 printf("pid %d's %s affinity mask: ", pid, i ? "new" : "current"); in do_taskset()
86 if (-1 == sched_setaffinity(pid, sizeof(toybuf), (void *)mask)) in do_taskset()
87 perror_exit(failed, "set", pid); in do_taskset()
107 pid_t pid = strtol(toys.optargs[toys.optc-1], &c, 10); in taskset_main() local
113 sprintf(buf, "/proc/%ld/task/", (long)pid); in taskset_main()
115 } else do_taskset(pid, 0); in taskset_main()