/Linux-v5.10/include/linux/ |
D | pid.h | 59 struct pid struct 73 extern struct pid init_struct_pid; argument 79 extern struct pid *pidfd_pid(const struct file *file); 80 struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags); 82 static inline struct pid *get_pid(struct pid *pid) in get_pid() argument 84 if (pid) in get_pid() 85 refcount_inc(&pid->count); in get_pid() 86 return pid; in get_pid() 89 extern void put_pid(struct pid *pid); 90 extern struct task_struct *pid_task(struct pid *pid, enum pid_type); [all …]
|
/Linux-v5.10/kernel/ |
D | pid.c | 48 struct pid init_struct_pid = { 105 void put_pid(struct pid *pid) in put_pid() argument 109 if (!pid) in put_pid() 112 ns = pid->numbers[pid->level].ns; in put_pid() 113 if (refcount_dec_and_test(&pid->count)) { in put_pid() 114 kmem_cache_free(ns->pid_cachep, pid); in put_pid() 122 struct pid *pid = container_of(rhp, struct pid, rcu); in delayed_put_pid() local 123 put_pid(pid); in delayed_put_pid() 126 void free_pid(struct pid *pid) in free_pid() argument 133 for (i = 0; i <= pid->level; i++) { in free_pid() [all …]
|
/Linux-v5.10/arch/x86/um/os-Linux/ |
D | registers.c | 21 int save_i387_registers(int pid, unsigned long *fp_regs) in save_i387_registers() argument 23 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) in save_i387_registers() 28 int save_fp_registers(int pid, unsigned long *fp_regs) in save_fp_registers() argument 36 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers() 41 return save_i387_registers(pid, fp_regs); in save_fp_registers() 44 int restore_i387_registers(int pid, unsigned long *fp_regs) in restore_i387_registers() argument 46 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) in restore_i387_registers() 51 int restore_fp_registers(int pid, unsigned long *fp_regs) in restore_fp_registers() argument 58 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers() 63 return restore_i387_registers(pid, fp_regs); in restore_fp_registers() [all …]
|
/Linux-v5.10/include/trace/events/ |
D | oom.h | 17 __field( pid_t, pid) 23 __entry->pid = task->pid; 29 __entry->pid, __entry->comm, __entry->oom_score_adj) 75 TP_PROTO(int pid), 77 TP_ARGS(pid), 80 __field(int, pid) 84 __entry->pid = pid; 87 TP_printk("pid=%d", __entry->pid) 91 TP_PROTO(int pid), 93 TP_ARGS(pid), [all …]
|
D | sched.h | 23 __field( pid_t, pid ) 28 __entry->pid = t->pid; 31 TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) 65 __field( pid_t, pid ) 73 __entry->pid = p->pid; 80 __entry->comm, __entry->pid, __entry->prio, 158 __entry->prev_pid = prev->pid; 162 __entry->next_pid = next->pid; 197 __field( pid_t, pid ) 205 __entry->pid = p->pid; [all …]
|
/Linux-v5.10/arch/powerpc/mm/book3s64/ |
D | radix_tlb.c | 30 unsigned int pid, in tlbiel_radix_set_isa300() argument 37 rs = ((unsigned long)pid << PPC_BITLSHIFT(31)); in tlbiel_radix_set_isa300() 94 static __always_inline void __tlbiel_pid(unsigned long pid, int set, in __tlbiel_pid() argument 101 rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); in __tlbiel_pid() 110 static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) in __tlbie_pid() argument 115 rs = pid << PPC_BITLSHIFT(31); in __tlbie_pid() 152 static __always_inline void __tlbiel_va(unsigned long va, unsigned long pid, in __tlbiel_va() argument 159 rs = pid << PPC_BITLSHIFT(31); in __tlbiel_va() 168 static __always_inline void __tlbie_va(unsigned long va, unsigned long pid, in __tlbie_va() argument 175 rs = pid << PPC_BITLSHIFT(31); in __tlbie_va() [all …]
|
/Linux-v5.10/arch/um/os-Linux/ |
D | start_up.c | 32 int pid = os_getpid(), ppid = getppid(); in ptrace_child() local 38 kill(pid, SIGKILL); in ptrace_child() 40 kill(pid, SIGSTOP); in ptrace_child() 48 if (sc_result == pid) in ptrace_child() 95 int pid, n, status; in start_ptraced_child() local 99 pid = fork(); in start_ptraced_child() 100 if (pid == 0) in start_ptraced_child() 102 else if (pid < 0) in start_ptraced_child() 105 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); in start_ptraced_child() 112 return pid; in start_ptraced_child() [all …]
|
D | helper.c | 46 int pid, fds[2], ret, n; in run_helper() local 74 pid = clone(helper_child, (void *) sp, CLONE_VM, &data); in run_helper() 75 if (pid < 0) { in run_helper() 91 ret = pid; in run_helper() 99 CATCH_EINTR(waitpid(pid, NULL, __WALL)); in run_helper() 117 int pid, status, err; in run_helper_thread() local 124 pid = clone(proc, (void *) sp, flags, arg); in run_helper_thread() 125 if (pid < 0) { in run_helper_thread() 132 CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); in run_helper_thread() 133 if (pid < 0) { in run_helper_thread() [all …]
|
/Linux-v5.10/arch/um/os-Linux/skas/ |
D | process.c | 26 int is_skas_winch(int pid, int fd, void *data) in is_skas_winch() argument 28 return pid == getpgrp(); in is_skas_winch() 31 static int ptrace_dump_regs(int pid) in ptrace_dump_regs() argument 36 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in ptrace_dump_regs() 55 void wait_stub_done(int pid) in wait_stub_done() argument 60 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); in wait_stub_done() 67 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done() 79 err = ptrace_dump_regs(pid); in wait_stub_done() 84 "pid = %d, n = %d, errno = %d, status = 0x%x\n", pid, n, errno, in wait_stub_done() 91 static void get_skas_faultinfo(int pid, struct faultinfo *fi, unsigned long *aux_fp_regs) in get_skas_faultinfo() argument [all …]
|
/Linux-v5.10/fs/f2fs/ |
D | trace.c | 27 last_io.pid, "----------------", in __print_last_io() 35 static int __file_type(struct inode *inode, pid_t pid) in __file_type() argument 47 else if (pid) in __file_type() 56 pid_t pid = task_pid_nr(current); in f2fs_trace_pid() local 59 set_page_private(page, (unsigned long)pid); in f2fs_trace_pid() 66 p = radix_tree_lookup(&pids, pid); in f2fs_trace_pid() 70 radix_tree_delete(&pids, pid); in f2fs_trace_pid() 72 if (radix_tree_insert(&pids, pid, current)) { in f2fs_trace_pid() 81 pid, current->comm); in f2fs_trace_pid() 90 pid_t pid; in f2fs_trace_ios() local [all …]
|
/Linux-v5.10/tools/perf/scripts/perl/ |
D | rw-by-pid.pl | 82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=> 84 my $comm = $reads{$pid}{comm} || ""; 85 my $total_reads = $reads{$pid}{total_reads} || 0; 86 my $bytes_requested = $reads{$pid}{bytes_requested} || 0; 87 my $bytes_read = $reads{$pid}{bytes_read} || 0; 89 printf("%6s %-20s %10s %10s %10s\n", $pid, $comm, 101 foreach my $pid (keys %reads) { 102 foreach my $error (keys %{$reads{$pid}{errors}}) { 103 my $comm = $reads{$pid}{comm} || ""; 104 my $errcount = $reads{$pid}{errors}{$error} || 0; [all …]
|
/Linux-v5.10/tools/testing/selftests/cgroup/ |
D | cgroup_util.c | 259 int pid = strtol(ptr, &ptr, 10); in cg_killall() local 261 if (pid == 0) in cg_killall() 267 if (kill(pid, SIGKILL)) in cg_killall() 292 int cg_enter(const char *cgroup, int pid) in cg_enter() argument 296 snprintf(pidbuf, sizeof(pidbuf), "%d", pid); in cg_enter() 314 int pid, retcode; in cg_run() local 316 pid = fork(); in cg_run() 317 if (pid < 0) { in cg_run() 318 return pid; in cg_run() 319 } else if (pid == 0) { in cg_run() [all …]
|
D | test_freezer.c | 116 static int cg_enter_and_wait_for_frozen(const char *cgroup, int pid, in cg_enter_and_wait_for_frozen() argument 126 ret = cg_enter(cgroup, pid); in cg_enter_and_wait_for_frozen() 460 int pid; in test_cgfreezer_mkdir() local 479 pid = cg_run_nowait(child, child_fn, NULL); in test_cgfreezer_mkdir() 480 if (pid < 0) in test_cgfreezer_mkdir() 569 int pid; in test_cgfreezer_migrate() local 585 pid = cg_run_nowait(cgroup[0], child_fn, NULL); in test_cgfreezer_migrate() 586 if (pid < 0) in test_cgfreezer_migrate() 598 if (cg_enter_and_wait_for_frozen(cgroup[1], pid, true)) in test_cgfreezer_migrate() 607 if (cg_enter_and_wait_for_frozen(cgroup[0], pid, false)) in test_cgfreezer_migrate() [all …]
|
/Linux-v5.10/arch/um/include/shared/ |
D | registers.h | 12 extern int save_i387_registers(int pid, unsigned long *fp_regs); 13 extern int restore_i387_registers(int pid, unsigned long *fp_regs); 14 extern int save_fp_registers(int pid, unsigned long *fp_regs); 15 extern int restore_fp_registers(int pid, unsigned long *fp_regs); 16 extern int save_fpx_registers(int pid, unsigned long *fp_regs); 17 extern int restore_fpx_registers(int pid, unsigned long *fp_regs); 18 extern int save_registers(int pid, struct uml_pt_regs *regs); 19 extern int restore_registers(int pid, struct uml_pt_regs *regs); 20 extern int init_registers(int pid); 23 extern int get_fp_registers(int pid, unsigned long *regs); [all …]
|
/Linux-v5.10/arch/powerpc/mm/ |
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 52 static inline void _tlbil_va(unsigned long address, unsigned int pid, in _tlbil_va() 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); [all …]
|
/Linux-v5.10/tools/bpf/runqslower/ |
D | runqslower.bpf.c | 28 static int trace_enqueue(u32 tgid, u32 pid) in trace_enqueue() argument 32 if (!pid || (targ_pid && targ_pid != pid)) in trace_enqueue() 36 bpf_map_update_elem(&start, &pid, &ts, 0); in trace_enqueue() 46 return trace_enqueue(p->tgid, p->pid); in handle__sched_wakeup() 55 return trace_enqueue(p->tgid, p->pid); in handle__sched_wakeup_new() 69 u32 pid; in handle__sched_switch() local 73 trace_enqueue(prev->tgid, prev->pid); in handle__sched_switch() 75 pid = next->pid; in handle__sched_switch() 78 tsp = bpf_map_lookup_elem(&start, &pid); in handle__sched_switch() 86 event.pid = pid; in handle__sched_switch() [all …]
|
/Linux-v5.10/tools/testing/selftests/ptrace/ |
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() 31 sys_ptrace(int request, pid_t pid, unsigned long addr, unsigned long data) in sys_ptrace() argument 33 return syscall(__NR_ptrace, request, pid, addr, data); in sys_ptrace() 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() [all …]
|
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 …]
|
/Linux-v5.10/scripts/ |
D | bootgraph.pl | 86 my $pid = $2; 88 if (!defined($pidctr{$pid})) { 89 $func = "wait_" . $pid . "_1"; 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}; [all …]
|
/Linux-v5.10/drivers/media/common/b2c2/ |
D | flexcop-hw-filter.c | 47 u16 pid, u16 mask) in flexcop_pid_group_filter() argument 51 v30c.pid_filter_30c_ext_ind_0_7.Group_PID = pid; in flexcop_pid_group_filter() 68 vpid.vregname.field = onoff ? pid : 0x1fff; \ 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 [all …]
|
/Linux-v5.10/drivers/net/wan/ |
D | hdlc_ppp.c | 66 u16 pid; /* protocol ID */ member 109 static inline struct proto* get_proto(struct net_device *dev, u16 pid) in get_proto() argument 113 switch (pid) { in get_proto() 125 static inline const char* proto_name(u16 pid) in proto_name() argument 127 switch (pid) { in proto_name() 204 static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, in ppp_tx_cp() argument 217 if (pid == PID_LCP && (code == LCP_ECHO_REQ || code == LCP_ECHO_REPLY)) in ppp_tx_cp() 247 proto_name(pid), code_names[code], id, debug_buffer); in ppp_tx_cp() 250 ppp_hard_header(skb, dev, pid, NULL, NULL, 0); in ppp_tx_cp() 302 static void ppp_cp_event(struct net_device *dev, u16 pid, u16 event, u8 code, in ppp_cp_event() argument [all …]
|
/Linux-v5.10/tools/testing/selftests/pidfd/ |
D | pidfd_wait.c | 34 static int sys_waitid(int which, pid_t pid, siginfo_t *info, int options, in sys_waitid() argument 37 return syscall(__NR_waitid, which, pid, info, options, ru); in sys_waitid() 51 pid_t pid; in TEST() local 59 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST() 60 ASSERT_NE(pid, 0); in TEST() 67 pid = sys_waitid(P_PIDFD, pidfd, &info, WEXITED, NULL); in TEST() 68 ASSERT_NE(pid, 0); in TEST() 72 pid = sys_clone3(&args); in TEST() 73 ASSERT_GE(pid, 0); in TEST() 75 if (pid == 0) in TEST() [all …]
|
/Linux-v5.10/tools/testing/selftests/clone3/ |
D | clone3_set_tid.c | 47 pid_t pid = -1; in call_clone3_set_tid() local 56 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid() 57 if (pid < 0) { in call_clone3_set_tid() 63 if (pid == 0) { in call_clone3_set_tid() 98 if (expected_pid == 0 || expected_pid == pid) { in call_clone3_set_tid() 100 getpid(), pid); in call_clone3_set_tid() 104 expected_pid, pid); in call_clone3_set_tid() 108 if (waitpid(pid, &status, 0) < 0) { in call_clone3_set_tid() 156 pid_t pid, ns1, ns2, ns3, ns_pid; in main() local 257 pid = fork(); in main() [all …]
|
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() 70 TH_LOG("I am the parent (%d). My child's pid is %d", getpid(), pid); 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() [all …]
|
/Linux-v5.10/samples/bpf/ |
D | offwaketime_kern.c | 71 u32 pid; in waker() local 73 pid = _(p->pid); in waker() 78 bpf_map_update_elem(&wokeby, &pid, &woke, BPF_ANY); in waker() 82 static inline int update_counts(void *ctx, u32 pid, u64 delta) in update_counts() argument 93 woke = bpf_map_lookup_elem(&wokeby, &pid); in update_counts() 97 bpf_map_delete_elem(&wokeby, &pid); in update_counts() 127 u32 pid = ctx->prev_pid; local 134 u32 pid = _(p->pid); 139 bpf_map_update_elem(&start, &pid, &ts, BPF_ANY); 142 pid = bpf_get_current_pid_tgid(); [all …]
|