Lines Matching defs:pid
396 static int write_pid_to_tasks(char *tasks, pid_t pid)
406 if (fprintf(fp, "%d\n", pid) < 0) {
407 perror("Failed to wr pid to tasks file");
424 * If a con_mon grp is requested, create it and write pid to it, otherwise
425 * write pid to root con_mon grp.
426 * If a mon grp is requested, create it and write pid to it, otherwise
427 * pid is not written, this means that pid is in con_mon grp and hence
444 /* Create control and monitoring group and write pid into it */
453 /* Create mon grp and write pid into it for "mbm" and "cmt" test */
656 pid_t pid;
665 pid = fork();
666 if (pid == 0) {
677 kill(pid, SIGTERM);
689 waitpid(pid, NULL, 0);
712 int perf_event_open(struct perf_event_attr *hw_event, pid_t pid, int cpu,
717 ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,