/openbmc/linux/tools/testing/selftests/ptrace/ |
H A D | get_syscall_info.c | 17 kill_tracee(pid_t pid) in kill_tracee() argument 19 if (!pid) in kill_tracee() 24 int rc = kill(pid, SIGKILL); in kill_tracee() 38 kill_tracee(pid); \ 77 pid_t pid = fork(); in TEST() local 79 ASSERT_LE(0, pid) { in TEST() 83 if (pid == 0) { in TEST() 85 pid = getpid(); in TEST() 107 { 0, pid } /* gettid */ in TEST() 156 pid, size, in TEST() [all …]
|
H A D | vmaccess.c | 26 int f, pid = fork(); in TEST() local 29 if (!pid) { in TEST() 38 sprintf(mm, "/proc/%d/mem", pid); in TEST() 42 f = kill(pid, SIGCONT); in TEST() 48 int s, k, pid = fork(); in TEST() local 50 if (!pid) { in TEST() 59 k = ptrace(PTRACE_ATTACH, pid, 0L, 0L); in TEST() 65 ASSERT_NE(k, pid); in TEST() 69 k = ptrace(PTRACE_ATTACH, pid, 0L, 0L); in TEST() 72 ASSERT_EQ(k, pid); in TEST() [all …]
|
/openbmc/linux/arch/um/os-Linux/ |
H A D | helper.c | 47 int pid, fds[2], ret, n; in run_helper() local 76 if (pid < 0) { in run_helper() 92 ret = pid; in run_helper() 122 int pid, status, err; in run_helper_thread() local 130 if (pid < 0) { in run_helper_thread() 137 CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); in run_helper_thread() 138 if (pid < 0) { in run_helper_thread() 142 pid = err; in run_helper_thread() 150 return pid; in run_helper_thread() 153 int helper_wait(int pid) in helper_wait() argument [all …]
|
H A D | registers.c | 14 int save_registers(int pid, struct uml_pt_regs *regs) in save_registers() argument 18 err = ptrace(PTRACE_GETREGS, pid, 0, regs->gp); in save_registers() 24 int restore_pid_registers(int pid, struct uml_pt_regs *regs) in restore_pid_registers() argument 28 err = ptrace(PTRACE_SETREGS, pid, 0, regs->gp); in restore_pid_registers() 39 int init_pid_registers(int pid) in init_pid_registers() argument 43 err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); in init_pid_registers() 47 arch_init_registers(pid); in init_pid_registers() 48 get_fp_registers(pid, exec_fp_regs); in init_pid_registers()
|
/openbmc/linux/scripts/ |
H A D | bootgraph.pl | 86 my $pid = $2; 88 if (!defined($pidctr{$pid})) { 90 $pidctr{$pid} = 1; 92 $pidctr{$pid} = $pidctr{$pid} + 1; 93 $func = "wait_" . $pid . "_" . $pidctr{$pid}; 102 $pids{$func} = $pid; 114 my $pid = $2; 115 my $func = "wait_" . $pid . "_" . $pidctr{$pid}; 178 my $pid = $pids{$key}; 181 $rows{$pid} = $rowscount; [all …]
|
/openbmc/linux/tools/testing/selftests/cgroup/ |
H A D | test_freezer.c | 403 int pid; in test_cgfreezer_mkdir() local 423 if (pid < 0) in test_cgfreezer_mkdir() 512 int pid; in test_cgfreezer_migrate() local 529 if (pid < 0) in test_cgfreezer_migrate() 588 int pid; in test_cgfreezer_ptrace() local 598 if (pid < 0) in test_cgfreezer_ptrace() 613 waitpid(pid, NULL, 0); in test_cgfreezer_ptrace() 733 waitpid(pid, NULL, 0); in test_cgfreezer_ptraced() 765 int pid = vfork(); in vfork_fn() local 767 if (pid == 0) in vfork_fn() [all …]
|
/openbmc/linux/drivers/media/common/b2c2/ |
H A D | flexcop-hw-filter.c | 47 u16 pid, u16 mask) in flexcop_pid_group_filter() argument 75 u16 pid, int onoff) in flexcop_pid_Stream1_PID_ctrl() argument 82 u16 pid, int onoff) in flexcop_pid_Stream2_PID_ctrl() argument 89 u16 pid, int onoff) in flexcop_pid_PCR_PID_ctrl() argument 95 u16 pid, int onoff) in flexcop_pid_PMT_PID_ctrl() argument 101 u16 pid, int onoff) in flexcop_pid_EMM_PID_ctrl() argument 107 u16 pid, int onoff) in flexcop_pid_ECM_PID_ctrl() argument 113 int index, u16 pid, int onoff) in flexcop_pid_control() argument 115 if (pid == 0x2000) in flexcop_pid_control() 119 pid, pid, index, onoff ? "on" : "off"); in flexcop_pid_control() [all …]
|
/openbmc/linux/include/trace/events/ |
H A D | sched.h | 29 __entry->pid = t->pid; 156 __entry->pid = p->pid; 290 __entry->pid = p->pid; 315 __entry->pid = p->pid; 349 TP_PROTO(struct pid *pid), 361 __entry->pid = pid_nr(pid); 415 __entry->pid = p->pid; 450 __entry->pid = tsk->pid; 508 __entry->pid = tsk->pid; 540 __entry->pid = tsk->pid; [all …]
|
/openbmc/qemu/io/ |
H A D | channel-command.c | 53 GPid pid) in qio_channel_command_new_pid() argument 61 ioc->pid = pid; in qio_channel_command_new_pid() 67 pid in qio_channel_command_new_pid() 79 GPid pid = 0; in qio_channel_command_new_spawn() local 87 &pid, in qio_channel_command_new_spawn() 124 kill(ioc->pid, SIGTERM); in qio_channel_command_abort() 126 kill(ioc->pid, SIGKILL); in qio_channel_command_abort() 146 TerminateProcess(ioc->pid, 0); in qio_channel_command_abort() 165 ioc->pid = 0; in qio_channel_command_init() 179 if (ioc->pid > 0) { in qio_channel_command_finalize() [all …]
|
/openbmc/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_wait.c | 50 pid_t pid; in TEST() local 59 ASSERT_NE(pid, 0); in TEST() 67 ASSERT_NE(pid, 0); in TEST() 72 ASSERT_GE(pid, 0); in TEST() 74 if (pid == 0) in TEST() 78 ASSERT_GE(pid, 0); in TEST() 99 pid_t pid; in TEST() local 106 ASSERT_GE(pid, 0); in TEST() 108 if (pid == 0) { in TEST() 160 pid_t pid; in TEST() local [all …]
|
/openbmc/linux/tools/testing/selftests/proc/ |
H A D | proc-loadavg-001.c | 27 pid_t pid; in main() local 36 pid = fork(); in main() 37 if (pid == -1) in main() 39 if (pid == 0) { in main() 56 pid = fork(); in main() 57 if (pid == -1) in main() 59 if (pid == 0) in main() 61 if (waitpid(pid, NULL, 0) == -1) in main() 77 if (waitpid(pid, &wstatus, 0) == -1) in main()
|
H A D | setns-dcache.c | 36 static pid_t pid = -1; variable 40 if (pid > 0) { in f() 41 kill(pid, SIGTERM); in f() 69 pid = fork(); in main() 70 if (pid == -1) { in main() 74 if (pid == 0) { in main() 94 snprintf(buf, sizeof(buf), "/proc/%u/ns/net", pid); in main() 108 kill(pid, SIGTERM); in main() 109 pid = 0; in main()
|
H A D | setns-sysvipc.c | 35 static pid_t pid = -1; variable 39 if (pid > 0) { in f() 40 kill(pid, SIGTERM); in f() 68 pid = fork(); in main() 69 if (pid == -1) { in main() 73 if (pid == 0) { in main() 93 snprintf(buf, sizeof(buf), "/proc/%u/ns/ipc", pid); in main() 107 kill(pid, SIGTERM); in main() 108 pid = 0; in main()
|
/openbmc/linux/drivers/net/wan/ |
H A D | hdlc_ppp.c | 66 u16 pid; /* protocol ID */ member 114 switch (pid) { in get_proto() 128 switch (pid) { in proto_name() 343 if (pid == PID_LCP) { in ppp_cp_event() 354 if (pid == PID_LCP) { in ppp_cp_event() 387 if (pid == PID_LCP) in ppp_cp_parse_cr() 442 u16 pid; in ppp_rx() local 457 pid = ntohs(hdr->protocol); in ppp_rx() 490 if (pid == PID_LCP) in ppp_rx() 494 if (pid == PID_LCP || pid == PID_IPCP || in ppp_rx() [all …]
|
/openbmc/linux/tools/testing/selftests/clone3/ |
H A D | clone3_set_tid.c | 47 pid_t pid = -1; in call_clone3_set_tid() local 57 if (pid < 0) { in call_clone3_set_tid() 63 if (pid == 0) { in call_clone3_set_tid() 257 pid = fork(); in main() 258 if (pid == 0) { in main() 266 set_tid[0] = pid; in main() 278 set_tid[1] = pid; in main() 286 set_tid[0] = pid; in main() 303 set_tid[1] = pid; in main() 312 set_tid[2] = pid; in main() [all …]
|
H A D | clone3_cap_checkpoint_restore.c | 45 pid_t pid = -1; in call_clone3_set_tid() local 53 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid() 54 if (pid < 0) { in call_clone3_set_tid() 59 if (pid == 0) { in call_clone3_set_tid() 72 if (waitpid(pid, &status, 0) < 0) { in call_clone3_set_tid() 140 pid_t pid; in TEST() local 153 pid = fork(); in TEST() 154 if (pid == 0) { in TEST() 158 ASSERT_GT(waitpid(pid, &status, 0), 0) in TEST() 162 set_tid[0] = pid; in TEST() [all …]
|
/openbmc/linux/kernel/bpf/ |
H A D | task_iter.c | 22 u32 pid; member 39 struct pid *pid; in task_group_seq_get_next() local 44 pid = find_pid_ns(common->pid, common->ns); in task_group_seq_get_next() 45 if (!pid) in task_group_seq_get_next() 70 if (!pid) in task_group_seq_get_next() 114 struct pid *pid; in task_seq_get_next() local 120 pid = find_pid_ns(common->pid, common->ns); in task_seq_get_next() 231 struct pid *pid; in bpf_iter_attach_task() local 244 aux->task.pid = linfo->task.pid; in bpf_iter_attach_task() 416 common->pid = aux->task.pid; in init_seq_pidns() [all …]
|
H A D | bpf_task_storage.c | 95 struct pid *pid; in bpf_pid_task_storage_lookup_elem() local 100 if (IS_ERR(pid)) in bpf_pid_task_storage_lookup_elem() 116 put_pid(pid); in bpf_pid_task_storage_lookup_elem() 119 put_pid(pid); in bpf_pid_task_storage_lookup_elem() 129 struct pid *pid; in bpf_pid_task_storage_update_elem() local 134 if (IS_ERR(pid)) in bpf_pid_task_storage_update_elem() 135 return PTR_ERR(pid); in bpf_pid_task_storage_update_elem() 155 put_pid(pid); in bpf_pid_task_storage_update_elem() 180 struct pid *pid; in bpf_pid_task_storage_delete_elem() local 185 if (IS_ERR(pid)) in bpf_pid_task_storage_delete_elem() [all …]
|
/openbmc/linux/tools/bpf/runqslower/ |
H A D | runqslower.bpf.c | 30 u32 pid = t->pid; in trace_enqueue() local 33 if (!pid || (targ_pid && targ_pid != pid)) in trace_enqueue() 74 u32 pid; in handle__sched_switch() local 80 pid = next->pid; in handle__sched_switch() 83 if (!pid || (targ_pid && targ_pid != pid)) in handle__sched_switch() 95 event.pid = pid; in handle__sched_switch()
|
/openbmc/linux/tools/testing/selftests/powerpc/benchmarks/ |
H A D | fork.c | 48 int pid; in start_process_on() local 50 pid = fork(); in start_process_on() 51 if (pid == -1) { in start_process_on() 56 if (pid) in start_process_on() 89 if (pid == -1) { in bench_fork() 93 if (pid == 0) { in bench_fork() 98 pid = waitpid(pid, NULL, 0); in bench_fork() 99 if (pid == -1) { in bench_fork() 111 if (pid == -1) { in bench_vfork() 115 if (pid == 0) { in bench_vfork() [all …]
|
/openbmc/linux/tools/perf/scripts/python/ |
H A D | netdev-times.py | 327 (name, context, cpu, time, pid, comm, vec) = event_info 341 (name, context, cpu, time, pid, comm, vec) = event_info 345 (name, context, cpu, time, pid, comm, vec) = event_info 363 (name, context, cpu, time, pid, comm, napi, dev_name, 373 (name, context, cpu, time, pid, comm, 391 (name, context, cpu, time, pid, comm, 406 (name, context, cpu, time, pid, comm, 417 (name, context, cpu, time, pid, comm, 432 (name, context, cpu, time, pid, comm, 450 'comm':comm, 'pid':pid, 'comm_t':time}) [all …]
|
/openbmc/linux/samples/bpf/ |
H A D | offwaketime.bpf.c | 66 u32 pid = BPF_CORE_READ(p, pid); in waker() local 72 bpf_map_update_elem(&wokeby, &pid, &woke, BPF_ANY); in waker() 87 woke = bpf_map_lookup_elem(&wokeby, &pid); in update_counts() 91 bpf_map_delete_elem(&wokeby, &pid); in update_counts() 111 u32 pid = ctx->prev_pid; local 118 u32 pid = BPF_CORE_READ(p, pid); 123 bpf_map_update_elem(&start, &pid, &ts, BPF_ANY); 126 pid = bpf_get_current_pid_tgid(); 127 tsp = bpf_map_lookup_elem(&start, &pid); 133 bpf_map_delete_elem(&start, &pid); [all …]
|
/openbmc/linux/tools/perf/util/ |
H A D | thread_map.c | 42 sprintf(name, "/proc/%d/task", pid); in thread_map__new_by_pid() 173 if (pid != -1) in thread_map__new() 174 return thread_map__new_by_pid(pid); in thread_map__new() 189 pid_t pid, prev_pid = INT_MAX; in thread_map__new_by_pid_str() local 199 pid = strtol(pos->s, &end_ptr, 10); in thread_map__new_by_pid_str() 201 if (pid == INT_MIN || pid == INT_MAX || in thread_map__new_by_pid_str() 205 if (pid == prev_pid) in thread_map__new_by_pid_str() 296 if (pid) in thread_map__new_str() 349 if (pid == -1) { in comm_init() 358 if (get_comm(&comm, pid)) in comm_init() [all …]
|
/openbmc/linux/tools/testing/selftests/powerpc/ |
H A D | harness.c | 31 pid_t pid; in run_test() local 36 pid = fork(); in run_test() 37 if (pid == 0) { in run_test() 40 } else if (pid == -1) { in run_test() 45 setpgid(pid, pid); in run_test() 53 rc = waitpid(pid, &status, 0); in run_test() 62 kill(-pid, SIGKILL); in run_test() 66 kill(-pid, SIGTERM); in run_test() 74 kill(-pid, SIGTERM); in run_test()
|
/openbmc/linux/arch/um/drivers/ |
H A D | slirp_user.c | 40 int pid; in slirp_tramp() local 44 pid = run_helper(slirp_pre_exec, &pe_data, argv); in slirp_tramp() 46 return pid; in slirp_tramp() 52 int fds[2], pid, err; in slirp_open() local 63 pid = err; in slirp_open() 68 pri->pid = err; in slirp_open() 87 if (pri->pid<1) { in slirp_close() 94 if (kill(pri->pid, SIGHUP)<0) { in slirp_close() 96 "(%d)\n", pri->pid, errno); in slirp_close() 99 err = helper_wait(pri->pid); in slirp_close() [all …]
|