| /linux-6.15/include/linux/ |
| H A D | pid.h | 55 struct pid struct 83 static inline struct pid *get_pid(struct pid *pid) in get_pid() argument 85 if (pid) in get_pid() 90 extern void put_pid(struct pid *pid); 106 struct pid *pid); 131 extern void free_pid(struct pid *pid); 148 if (pid) in ns_of_pid() 149 ns = pid->numbers[pid->level].ns; in ns_of_pid() 161 return pid->numbers[pid->level].nr == 1; in is_child_reaper() 175 static inline pid_t pid_nr(struct pid *pid) in pid_nr() argument [all …]
|
| /linux-6.15/tools/testing/selftests/powerpc/ptrace/ |
| H A D | ptrace-perf-hwbreak.c | 89 err = ptrace_getregs(pid, ®s); in ptrace_getreg_pc() 103 err = ptrace_getregs(pid, ®s); in ptrace_setreg_pc() 109 err = ptrace_setregs(pid, ®s); in ptrace_setreg_pc() 194 *pid = fork(); in ptrace_fork_child() 196 if (*pid < 0) in ptrace_fork_child() 199 if (!*pid) { in ptrace_fork_child() 237 err = ptrace_fork_child(&pid); in same_watch_addr_test() 241 if (!pid) { in same_watch_addr_test() 246 err = check_watchpoints(pid); in same_watch_addr_test() 400 if (!pid) { in perf_then_ptrace_test() [all …]
|
| /linux-6.15/kernel/ |
| H A D | pid.c | 94 void put_pid(struct pid *pid) in put_pid() argument 111 struct pid *pid = container_of(rhp, struct pid, rcu); in delayed_put_pid() local 115 void free_pid(struct pid *pid) in free_pid() argument 164 struct pid *pid; in alloc_pid() local 340 struct pid *pid; in attach_pid() local 381 struct pid *pid) in change_pid() argument 461 struct pid *pid; in get_task_pid() local 483 struct pid *pid; in find_get_pid() local 548 struct pid *pid; in pidfd_get_pid() local 576 struct pid *pid; in pidfd_get_task() local [all …]
|
| /linux-6.15/tools/testing/selftests/powerpc/signal/ |
| H A D | sigreturn_kernel.c | 35 pid_t pid; in fork_child() local 37 pid = fork(); in fork_child() 38 if (pid == 0) { in fork_child() 43 return pid; in fork_child() 62 pid_t pid; in test_sigreturn_kernel() local 74 expect_segv(pid); in test_sigreturn_kernel() 79 expect_segv(pid); in test_sigreturn_kernel() 84 expect_segv(pid); in test_sigreturn_kernel() 89 expect_segv(pid); in test_sigreturn_kernel() 94 expect_segv(pid); in test_sigreturn_kernel() [all …]
|
| /linux-6.15/arch/powerpc/mm/book3s64/ |
| H A D | radix_tlb.c | 29 unsigned int pid, in tlbiel_radix_set_isa300() argument 352 unsigned long pid; member 372 struct tlbiel_pid t = { .pid = pid, .ric = ric }; in _tlbiel_pid_multicast() 488 unsigned long pid; member 518 unsigned long pid; member 563 .pid = pid, .page_size = page_size, in _tlbiel_va_range_multicast() 836 unsigned long pid; in radix__flush_tlb_mm() local 877 unsigned long pid; in __flush_all_mm() local 917 unsigned long pid; in radix__flush_tlb_page_psize() local 1021 unsigned long pid; in __radix__flush_tlb_range() local [all …]
|
| /linux-6.15/tools/testing/selftests/pid_namespace/ |
| H A D | pid_max.c | 40 pid_t pid; in pid_max_cb() local 69 pid = fork(); in pid_max_cb() 70 if (pid == 0) in pid_max_cb() 137 pid_t pid; in pid_max_nested_inner() local 140 if (pid < 0) in pid_max_nested_inner() 161 pid_t pid; in pid_max_nested_outer() local 229 pid_t pid; in pid_max_nested_limit_inner() local 287 pid_t pid; in pid_max_nested_limit_outer() local 332 pid_t pid; in TEST() local 342 pid_t pid; in TEST() local [all …]
|
| /linux-6.15/tools/testing/selftests/rlimits/ |
| H A D | rlimits-per-userns.c | 32 pid_t pid = getpid(); in setrlimit_nproc() local 46 pid_t pid = fork(); in fork_child() local 48 if (pid < 0) in fork_child() 51 if (pid > 0) in fork_child() 52 return pid; in fork_child() 54 pid = getpid(); in fork_child() 91 pid_t pid; in main() local 99 pid = getpid(); in main() 101 warnx("(pid=%d) Starting testcase", pid); in main() 155 warnx("(pid=%d): Test failed", pid); in main() [all …]
|
| /linux-6.15/arch/um/os-Linux/ |
| H A D | start_up.c | 41 kill(pid, SIGKILL); in ptrace_child() 43 kill(pid, SIGSTOP); in ptrace_child() 51 if (sc_result == pid) in ptrace_child() 98 int pid, n, status; in start_ptraced_child() local 102 pid = fork(); in start_ptraced_child() 103 if (pid == 0) in start_ptraced_child() 105 else if (pid < 0) in start_ptraced_child() 115 return pid; in start_ptraced_child() 176 stop_ptraced_child(pid, 0); in check_sysemu() 183 stop_ptraced_child(pid, 1); in check_sysemu() [all …]
|
| /linux-6.15/fs/ |
| H A D | pidfs.c | 92 void pidfs_add_pid(struct pid *pid) in pidfs_add_pid() argument 133 void pidfs_remove_pid(struct pid *pid) in pidfs_remove_pid() argument 178 struct pid *pid = pidfd_pid(f); in pidfd_show_fdinfo() local 212 struct pid *pid = pidfd_pid(file); in pidfd_poll() local 247 struct pid *pid = pidfd_pid(file); in pidfd_info() local 611 struct pid *pid = inode->i_private; in pidfs_evict_inode() local 676 const struct pid *pid = rb_entry(node, struct pid, pidfs_node); in pidfs_ino_find() local 688 struct pid *pid; in pidfs_ino_get_pid() local 719 struct pid *pid; in pidfs_fh_to_dentry() local 826 const struct pid *pid = data; in pidfs_init_inode() local [all …]
|
| /linux-6.15/include/trace/events/ |
| H A D | oom.h | 25 __entry->pid = task->pid; 94 __entry->pid = task->pid; 106 __entry->pid, 121 TP_ARGS(pid), 128 __entry->pid = pid; 137 TP_ARGS(pid), 144 __entry->pid = pid; 153 TP_ARGS(pid), 160 __entry->pid = pid; 169 TP_ARGS(pid), [all …]
|
| H A D | sched.h | 29 __entry->pid = t->pid; 156 __entry->pid = p->pid; 288 __entry->pid = p->pid; 313 __entry->pid = p->pid; 347 TP_PROTO(struct pid *pid), 413 __entry->pid = p->pid; 448 __entry->pid = task->pid; 483 __entry->pid = tsk->pid; 541 __entry->pid = tsk->pid; 573 __entry->pid = tsk->pid; [all …]
|
| /linux-6.15/arch/powerpc/mm/nohash/ |
| H A D | tlb.c | 130 unsigned int pid; in local_flush_tlb_mm() local 133 pid = mm->context.id; in local_flush_tlb_mm() 135 _tlbil_pid(pid); in local_flush_tlb_mm() 143 unsigned int pid; in __local_flush_tlb_page() local 177 unsigned int pid; member 215 unsigned int pid; in flush_tlb_mm() local 218 pid = mm->context.id; in flush_tlb_mm() 222 struct tlb_flush_param p = { .pid = pid }; in flush_tlb_mm() 227 _tlbil_pid(pid); in flush_tlb_mm() 237 unsigned int pid; in __flush_tlb_page() local [all …]
|
| /linux-6.15/tools/perf/scripts/perl/ |
| H A D | rw-by-pid.pl | 84 my $comm = $reads{$pid}{comm} || ""; 85 my $total_reads = $reads{$pid}{total_reads} || 0; 87 my $bytes_read = $reads{$pid}{bytes_read} || 0; 101 foreach my $pid (keys %reads) { 102 foreach my $error (keys %{$reads{$pid}{errors}}) { 103 my $comm = $reads{$pid}{comm} || ""; 125 my $comm = $writes{$pid}{comm} || ""; 129 printf("%6s %-20s %10s %10s\n", $pid, $comm, 141 foreach my $pid (keys %writes) { 142 foreach my $error (keys %{$writes{$pid}{errors}}) { [all …]
|
| /linux-6.15/tools/testing/selftests/cgroup/ |
| H A D | cgroup_util.c | 355 return pid; in cg_run() 375 pid_t pid; in clone_into_cgroup() local 392 return pid; in clone_into_cgroup() 450 pid_t pid; in clone_into_cgroup_run_nowait() local 461 return pid; in clone_into_cgroup_run_nowait() 468 int pid; in cg_run_nowait() local 471 if (pid > 0) in cg_run_nowait() 472 return pid; in cg_run_nowait() 488 return pid; in cg_run_nowait() 586 if (!pid) in proc_read_text() [all …]
|
| 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 …]
|
| /linux-6.15/drivers/gpu/drm/amd/amdkfd/ |
| H A D | kfd_smi_events.c | 43 pid_t pid; member 169 if (pid && client->pid != pid && !(client->suser && (events & all))) in kfd_smi_ev_enabled() 183 if (!kfd_smi_ev_enabled(pid, client, smi_event)) in add_event_to_kfifo() 216 add_event_to_kfifo(pid, dev, event, fifo_in, len); in kfd_smi_event_add() 257 if (task_info->pid) in kfd_smi_event_update_vmfault() 259 task_info->pid, task_info->task_name)); in kfd_smi_event_update_vmfault() 278 pid, address, node->id, migration ? 'M' : 'U')); in kfd_smi_event_page_fault_end() 289 ktime_get_boottime_ns(), pid, start, end - start, in kfd_smi_event_migration_start() 331 kfd_smi_event_add(p->lead_thread->pid, pdd->dev, in kfd_smi_event_queue_restore_rescheduled() 334 p->lead_thread->pid, pdd->dev->id, 'R')); in kfd_smi_event_queue_restore_rescheduled() [all …]
|
| /linux-6.15/arch/powerpc/mm/ |
| H A D | mmu_decl.h | 31 static inline void _tlbil_pid(unsigned int pid) in _tlbil_pid() argument 34 trace_tlbia(pid); in _tlbil_pid() 36 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument 40 extern void _tlbil_pid(unsigned int pid); 42 extern void _tlbil_pid_noind(unsigned int pid); 44 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument 56 trace_tlbie(0, 0, address, pid, 0, 0, 0); in _tlbil_va() 59 extern void _tlbil_va(unsigned long address, unsigned int pid, 62 extern void __tlbil_va(unsigned long address, unsigned int pid); 66 __tlbil_va(address, pid); in _tlbil_va() [all …]
|
| /linux-6.15/tools/testing/selftests/bpf/progs/ |
| H A D | task_kfunc_common.h | 25 struct task_struct *bpf_task_from_pid(s32 pid) __ksym; 32 s32 pid; in tasks_kfunc_map_value_lookup() local 35 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_value_lookup() 39 return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_value_lookup() 47 s32 pid; in tasks_kfunc_map_insert() local 49 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_insert() 54 status = bpf_map_update_elem(&__tasks_kfunc_map, &pid, &local, BPF_NOEXIST); in tasks_kfunc_map_insert() 58 v = bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert() 60 bpf_map_delete_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()
|
| /linux-6.15/Documentation/translations/zh_CN/accounting/ |
| H A D | taskstats.rst | 23 “pid”、“tid”、“任务”互换使用,用于描述由struct task_struct定义的标准 24 Linux任务。“每pid的统计数据”等价于“每任务的统计数据”。 35 (NETLINK_GENERIC族)然后发送指定pid或tgid的命令。响应消息中包含单个 36 任务的统计信息(若指定了pid)或进程所有任务汇总的统计信息(若指定了tgid)。 39 cpu掩码内的cpu上有任务退出时,每pid的统计信息将发送给注册成功的监听者。使用 44 记录也将发送给用户空间。后者包含线程组中所有线程(包括过去和现在)的每pid统计 71 1. 命令:由用户发送给内核。获取指定pid/tgid数据的命令包含一个类型为 73 pid/tgid指示用户空间要统计的任务/进程。 94 a) TASKSTATS_TYPE_AGGR_PID:指示其后两个属性为pid+stats。 95 b) TASKSTATS_TYPE_PID:包含退出任务的pid。 [all …]
|
| /linux-6.15/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 …]
|
| /linux-6.15/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 …]
|
| /linux-6.15/arch/um/os-Linux/skas/ |
| H A D | process.c | 34 return pid == getpgrp(); in is_skas_winch() 112 void wait_stub_done(int pid) in wait_stub_done() argument 136 err = ptrace_dump_regs(pid); in wait_stub_done() 157 wait_stub_done(pid); in get_skas_faultinfo() 335 int pid, status, n, err; in start_userspace() local 355 if (pid < 0) { in start_userspace() 394 return pid; in start_userspace() 476 if (ptrace(op, pid, 0, 0)) { in userspace() 525 get_skas_faultinfo(pid, in userspace() 533 handle_trap(pid, regs); in userspace() [all …]
|
| /linux-6.15/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 …]
|
| /linux-6.15/tools/testing/selftests/clone3/ |
| H A D | clone3_set_tid.c | 45 pid_t pid = -1; in call_clone3_set_tid() local 55 if (pid < 0) { in call_clone3_set_tid() 61 if (pid == 0) { in call_clone3_set_tid() 270 pid = fork(); in main() 271 if (pid == 0) { in main() 279 set_tid[0] = pid; in main() 293 set_tid[1] = pid; in main() 302 set_tid[0] = pid; in main() 321 set_tid[1] = pid; in main() 332 set_tid[2] = pid; in main() [all …]
|
| /linux-6.15/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 …]
|