arch/um/drivers/vector_user.c
214
srand(getpid());
arch/um/os-Linux/sigio.c
36
int pid = getpid();
arch/um/os-Linux/umid.c
229
snprintf(pid, sizeof(pid), "%d\n", getpid());
arch/um/os-Linux/util.c
95
if (kill(getpid(), SIGABRT) < 0)
drivers/i3c/master.c
1398
struct i3c_ccc_getpid *getpid;
drivers/i3c/master.c
1403
getpid = i3c_ccc_cmd_dest_init(&dest, info->dyn_addr, sizeof(*getpid));
drivers/i3c/master.c
1404
if (!getpid)
drivers/i3c/master.c
1413
for (i = 0; i < sizeof(getpid->pid); i++) {
drivers/i3c/master.c
1414
int sft = (sizeof(getpid->pid) - i - 1) * 8;
drivers/i3c/master.c
1416
info->pid |= (u64)getpid->pid[i] << sft;
kernel/sys.c
999
SYSCALL_DEFINE0(getpid)
samples/bpf/task_fd_query_user.c
101
err = bpf_task_fd_query(getpid(), event_fd, 0, buf, &len,
samples/bpf/task_fd_query_user.c
164
CHECK_PERROR_RET(bpf_task_fd_query(getpid(), fd, 0, buf, buf_len,
samples/bpf/task_fd_query_user.c
243
res = snprintf(event_alias, sizeof(event_alias), "test_%d", getpid());
samples/bpf/task_fd_query_user.c
280
err = bpf_task_fd_query(getpid(), kfd, 0, buf, &len,
samples/connector/ucon.c
58
nlh->nlmsg_pid = getpid();
samples/pidfd/pidfd-metadata.c
30
printf("%d\n", getpid());
samples/timers/hpet_example.c
251
if ((fcntl(fd, F_SETOWN, getpid()) == 1) ||
samples/vfs/mountinfo.c
215
pid_t pid = getpid();
samples/vfs/test-list-all-mounts.c
78
pidfd = sys_pidfd_open(getpid(), 0);
scripts/kconfig/confdata.c
836
name, (int)getpid());
tools/accounting/delaytop.c
478
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/delaytop.c
671
if (send_cmd(nl_sd, family_id, getpid(), TASKSTATS_CMD_GET,
tools/accounting/delaytop.c
829
if (send_cmd(nl_sd, family_id, getpid(), CGROUPSTATS_CMD_GET,
tools/accounting/getdelays.c
176
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/getdelays.c
574
mypid = getpid();
tools/accounting/procacct.c
182
rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
tools/accounting/procacct.c
330
mypid = getpid();
tools/bpf/bpf_jit_disasm.c
41
snprintf(tpath, size, "/proc/%d/exe", (int) getpid());
tools/bpf/bpftool/perf.c
46
bpf_task_fd_query(getpid(), fd, 0, buf, &len, &prog_id,
tools/hv/hv_fcopy_uio_daemon.c
485
syslog(LOG_INFO, "starting; pid is:%d", getpid());
tools/hv/hv_kvp_daemon.c
137
fl.l_pid = getpid();
tools/hv/hv_kvp_daemon.c
149
fl.l_pid = getpid();
tools/hv/hv_kvp_daemon.c
1819
syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());
tools/hv/hv_vss_daemon.c
245
syslog(LOG_INFO, "VSS starting; pid is:%d", getpid());
tools/include/nolibc/arch-sparc.h
175
static pid_t getpid(void);
tools/include/nolibc/arch-sparc.h
182
parent = getpid();
tools/include/nolibc/arch-sparc.h
198
parent = getpid();
tools/lib/bpf/libbpf.c
11517
snprintf(buf, buf_sz, "libbpf_%u_%d_%s_0x%zx", getpid(),
tools/lib/bpf/libbpf.c
11637
pfd = perf_event_open_probe(false, false, syscall_name, 0, getpid(), 0);
tools/lib/bpf/libbpf.c
12557
pid = getpid();
tools/lib/bpf/libbpf.c
4917
snprintf(file, sizeof(file), "/proc/%d/fdinfo/%d", getpid(), fd);
tools/lib/bpf/usdt.c
996
pid = getpid();
tools/perf/arch/x86/tests/amd-ibs-period.c
125
if (sched_setaffinity(getpid(), sizeof(set), &set) == -1) {
tools/perf/bench/epoll-ctl.c
366
getpid(), nthreads, nfds, nsecs);
tools/perf/bench/epoll-wait.c
491
getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs);
tools/perf/bench/futex-hash.c
171
getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime);
tools/perf/bench/futex-lock-pi.c
203
getpid(), params.nthreads, params.runtime);
tools/perf/bench/futex-requeue.c
213
"%d at a time.\n\n", getpid(), params.nthreads,
tools/perf/bench/futex-wake-parallel.c
302
getpid(), params.nthreads, params.fshared ? "shared":"private",
tools/perf/bench/futex-wake.c
181
getpid(), params.nthreads, params.fshared ? "shared":"private",
tools/perf/bench/mem-functions.c
126
cycles_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1, perf_event_open_cloexec_flag());
tools/perf/bench/sched-pipe.c
123
pid = getpid();
tools/perf/bench/synthesize.c
130
threads = thread_map__new_by_pid(getpid());
tools/perf/builtin-daemon.c
1161
scnprintf(buf, sizeof(buf), "%d", getpid());
tools/perf/builtin-daemon.c
1290
pr_info("daemon started (pid %d)\n", getpid());
tools/perf/builtin-daemon.c
680
getpid(), csv_sep, "daemon",
tools/perf/builtin-daemon.c
696
fprintf(out, "[%d:daemon] base: %s\n", getpid(), daemon->base);
tools/perf/builtin-stat.c
1137
kill(getpid(), signr);
tools/perf/builtin-timechart.c
1739
if (asprintf(&filter, "common_pid != %d", getpid()) < 0) {
tools/perf/builtin-trace.c
3498
pid_t pid = getpid();
tools/perf/builtin-trace.c
4119
getpid(),
tools/perf/builtin-trace.c
5038
trace->filter_pids.entries[0] = getpid();
tools/perf/jvmti/jvmti_agent.c
276
ret = snprintf(dump_path, PATH_MAX, "%s/jit-%i.dump", jit_path, getpid());
tools/perf/jvmti/jvmti_agent.c
280
" JITDUMPDIR, and HOME variables", jit_path, getpid());
tools/perf/jvmti/jvmti_agent.c
313
header.pid = getpid();
tools/perf/jvmti/jvmti_agent.c
386
rec.pid = getpid();
tools/perf/tests/backward-ring-buffer.c
101
snprintf(pid, sizeof(pid), "%d", getpid());
tools/perf/tests/bp_signal.c
134
fcntl(fd, F_SETOWN, getpid());
tools/perf/tests/bp_signal_overflow.c
111
fcntl(fd, F_SETOWN, getpid());
tools/perf/tests/builtin-test.c
344
pr_debug("test child forked, pid %d\n", getpid());
tools/perf/tests/code-reading.c
711
pid = getpid();
tools/perf/tests/dlfilter-test.c
413
int pid = getpid();
tools/perf/tests/dwarf-unwind.c
188
pid_t pid = getpid();
tools/perf/tests/event-times.c
65
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/event-times.c
91
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/keep-tracking.c
46
(pid_t)event->comm.pid == getpid() &&
tools/perf/tests/keep-tracking.c
47
(pid_t)event->comm.tid == getpid() &&
tools/perf/tests/keep-tracking.c
81
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/mmap-basic.c
52
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/mmap-thread-lookup.c
147
map = thread_map__new_by_pid(getpid());
tools/perf/tests/mmap-thread-lookup.c
194
thread = machine__findnew_thread(machine, getpid(), td->tid);
tools/perf/tests/openat-syscall-all-cpus.c
31
struct perf_thread_map *threads = thread_map__new_by_tid(getpid());
tools/perf/tests/openat-syscall-tp-fields.c
67
perf_thread_map__set_pid(evlist->core.threads, 0, getpid());
tools/perf/tests/openat-syscall.c
23
struct perf_thread_map *threads = thread_map__new_by_tid(getpid());
tools/perf/tests/perf-time-to-tsc.c
158
(pid_t)event->comm.pid != getpid() ||
tools/perf/tests/perf-time-to-tsc.c
159
(pid_t)event->comm.tid != getpid())
tools/perf/tests/perf-time-to-tsc.c
93
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/sw-clock.c
67
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/switch-tracking.c
354
threads = thread_map__new_by_tid(getpid());
tools/perf/tests/switch-tracking.c
78
(pid_t)event->comm.pid == getpid() &&
tools/perf/tests/switch-tracking.c
79
(pid_t)event->comm.tid == getpid() &&
tools/perf/tests/tests-scripts.c
180
snprintf(link, sizeof(link), "/proc/%d/fd/%d", getpid(), dir_fd);
tools/perf/tests/thread-map.c
116
asprintf(&str, "%d,%d", getpid(), getppid()) >= 0);
tools/perf/tests/thread-map.c
31
map = thread_map__new_by_pid(getpid());
tools/perf/tests/thread-map.c
38
perf_thread_map__pid(map, 0) == getpid());
tools/perf/tests/thread-map.c
72
TEST_ASSERT_VAL("wrong pid", map->entries[0].pid == (u64) getpid());
tools/perf/tests/thread-map.c
80
perf_thread_map__pid(threads, 0) == getpid());
tools/perf/tests/thread-map.c
98
threads = thread_map__new_by_pid(getpid());
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
538
if (pid_filter__has(&pids_filtered, getpid()))
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
564
if (pid_filter__has(&pids_filtered, getpid()))
tools/perf/util/debug.c
312
pid_t pid = getpid();
tools/perf/util/parse-events.c
2651
snprintf(new_filter, sizeof(new_filter), "common_pid != %d", getpid());
tools/perf/util/util.c
544
snprintf(path, sizeof(path), "/proc/%d/fd/%d", getpid(), fd);
tools/power/cpupower/bench/system.c
84
if (sched_setaffinity(getpid(), sizeof(cpu_set_t), &cpuset) < 0) {
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
87
if (sched_getaffinity(getpid(), sizeof(set), &set) == 0) {
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
90
return sched_setaffinity(getpid(), sizeof(set), &set);
tools/power/x86/intel-speed-select/isst-daemon.c
215
fprintf(stderr, "Couldn't get lock file %d\n", getpid());
tools/power/x86/intel-speed-select/isst-daemon.c
218
snprintf(str, sizeof(str), "%d\n", getpid());
tools/sched_ext/scx_qmap.c
102
skel->rodata->disallow_tgid = getpid();
tools/sched_ext/scx_userland.c
349
err = syscall(__NR_sched_setscheduler, getpid(), SCHED_EXT, &sched_param);
tools/sched_ext/scx_userland.c
390
skel->rodata->usersched_pid = getpid();
tools/testing/selftests/arm64/abi/ptrace.c
235
ksft_print_msg("Parent is %d, child is %d\n", getpid(), child);
tools/testing/selftests/arm64/abi/ptrace.c
255
srandom(getpid());
tools/testing/selftests/arm64/abi/syscall-abi.c
537
srandom(getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
113
if (getpid() != get_tpidr2()) {
tools/testing/selftests/arm64/abi/tpidr2.c
148
parent = getpid();
tools/testing/selftests/arm64/abi/tpidr2.c
219
ksft_print_msg("PID: %d\n", getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
43
set_tpidr2(getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
45
return getpid() == get_tpidr2();
tools/testing/selftests/arm64/abi/tpidr2.c
51
set_tpidr2(getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
55
return getpid() == get_tpidr2();
tools/testing/selftests/arm64/abi/tpidr2.c
68
set_tpidr2(getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
70
oldpid = getpid();
tools/testing/selftests/arm64/abi/tpidr2.c
80
set_tpidr2(getpid());
tools/testing/selftests/arm64/abi/tpidr2.c
81
if (get_tpidr2() == getpid()) {
tools/testing/selftests/arm64/fp/fp-ptrace.c
1619
srandom(getpid());
tools/testing/selftests/arm64/fp/sve-ptrace.c
748
ksft_print_msg("Parent is %d, child is %d\n", getpid(), child);
tools/testing/selftests/arm64/fp/sve-ptrace.c
904
srandom(getpid());
tools/testing/selftests/arm64/fp/za-fork.c
79
ksft_print_msg("PID: %d\n", getpid());
tools/testing/selftests/arm64/fp/za-ptrace.c
313
ksft_print_msg("Parent is %d, child is %d\n", getpid(), child);
tools/testing/selftests/arm64/fp/za-ptrace.c
347
srandom(getpid());
tools/testing/selftests/arm64/fp/zt-ptrace.c
317
ksft_print_msg("Parent is %d, child is %d\n", getpid(), child);
tools/testing/selftests/arm64/fp/zt-ptrace.c
337
srandom(getpid());
tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
102
cpid = getpid();
tools/testing/selftests/bpf/benchs/bench_local_storage_create.c
91
skel->bss->bench_pid = getpid();
tools/testing/selftests/bpf/benchs/bench_local_storage_rcu_tasks_trace.c
133
runner_pid = getpid();
tools/testing/selftests/bpf/cgroup_helpers.c
254
pid_t pid = getpid();
tools/testing/selftests/bpf/cgroup_helpers.c
44
format_cgroup_path_pid(buf, path, getpid())
tools/testing/selftests/bpf/cgroup_helpers.c
54
format_classid_path_pid(buf, getpid())
tools/testing/selftests/bpf/cgroup_helpers.c
631
if (dprintf(fd, "%u\n", getpid()) < 0) {
tools/testing/selftests/bpf/network_helpers.c
1187
PCAP_DIR "/packets-%d-%d-%s-%s.log", getpid(), tmon_seq++,
tools/testing/selftests/bpf/prog_tests/arena_atomics.c
243
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/atomics.c
185
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
115
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
199
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
255
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_gotox.c
458
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1290
!ASSERT_EQ(val, getpid(), "bpf_map_lookup_elem"))
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1297
ASSERT_EQ(val, -getpid(), "bpf_map_lookup_elem");
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1491
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1561
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1639
linfo.task.tid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1665
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1702
linfo.task.pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1709
linfo.task.tid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
187
linfo.task.tid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
198
ASSERT_EQ(info.iter.task.tid, getpid(), "check_task_tid");
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
258
ASSERT_NEQ(getpid(), sys_gettid(), "check_new_thread_id");
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
267
linfo.task.pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
296
linfo.task.pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
309
pidfd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
436
skel->bss->tgid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
444
linfo.task.tid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_loop.c
189
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/bpf_mod_race.c
110
skel->rodata->bpf_mod_race_config.tgid = getpid();
tools/testing/selftests/bpf/prog_tests/cgroup1_hierarchy.c
79
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/cgroup_get_current_cgroup_id.c
32
skel->bss->expected_pid = getpid();
tools/testing/selftests/bpf/prog_tests/cgroup_iter.c
296
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c
22
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/core_read_macros.c
35
bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/core_reloc.c
1015
my_pid_tgid = getpid() | ((uint64_t)sys_gettid() << 32);
tools/testing/selftests/bpf/prog_tests/core_retro.c
9
int err, zero = 0, res, my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/cpumask.c
46
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/custom_sec_handlers.c
142
skel->rodata->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/d_path.c
137
(*skel)->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/dynptr.c
70
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/exhandler.c
28
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/fexit_sleep.c
17
fexit_skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/file_reader.c
87
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/fill_link_info.c
470
ASSERT_EQ(info.uprobe_multi.pid, getpid(), "info.uprobe_multi.pid");
tools/testing/selftests/bpf/prog_tests/find_vma.c
118
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
144
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
252
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
45
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/global_map_resize.c
137
skel->rodata->pid = getpid();
tools/testing/selftests/bpf/prog_tests/global_map_resize.c
67
skel->rodata->pid = getpid();
tools/testing/selftests/bpf/prog_tests/htab_update.c
31
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/iters.c
119
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/iters.c
183
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/iters.c
228
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/iters.c
278
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/kfunc_dynptr_param.c
76
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
152
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
243
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
347
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
383
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
414
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
552
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
56
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
76
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/kprobe_multi_testmod_test.c
28
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/legacy_printk.c
9
int err, zero = 0, my_pid = getpid(), res, map_fd;
tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c
55
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/lookup_and_delete.c
83
skel->bss->set_pid = getpid();
tools/testing/selftests/bpf/prog_tests/lookup_key.c
66
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/map_btf.c
22
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/map_btf.c
69
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/map_in_map.c
105
skel->bss->tgid = getpid();
tools/testing/selftests/bpf/prog_tests/map_init.c
87
bss->inPid = getpid();
tools/testing/selftests/bpf/prog_tests/map_lookup_percpu_elem.c
26
skel->rodata->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/map_ops.c
57
(*skel)->rodata->pid = getpid();
tools/testing/selftests/bpf/prog_tests/mptcp.c
276
mptcpify_skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/mptcp.c
412
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
179
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c
27
*tgid = getpid();
tools/testing/selftests/bpf/prog_tests/percpu_alloc.c
23
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/percpu_alloc.c
56
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/percpu_alloc.c
91
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/perf_buffer.c
49
int zero = 0, my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/probe_read_user_str.c
55
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/prog_array_init.c
16
skel->rodata->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/read_vsyscall.c
44
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf.c
115
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf.c
211
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf.c
414
skel_n->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf.c
475
skel_map_key->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf.c
527
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c
82
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/send_signal.c
138
pmu_fd = syscall(__NR_perf_event_open, attr, getpid(), -1 /* cpu */,
tools/testing/selftests/bpf/prog_tests/send_signal.c
162
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/send_signal_sched_switch.c
42
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/sk_storage_tracing.c
113
my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/skc_to_unix_sock.c
20
skel->rodata->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/snprintf.c
46
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/stack_var_off.c
18
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/stacktrace_map_skip.c
30
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/tailcalls.c
1708
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/task_fd_query_rawtp.c
24
err = bpf_task_fd_query(getpid(), efd, 0, buf, &len, &prog_id,
tools/testing/selftests/bpf/prog_tests/task_fd_query_rawtp.c
38
err = bpf_task_fd_query(getpid(), efd, 0, buf, &len, &prog_id,
tools/testing/selftests/bpf/prog_tests/task_fd_query_rawtp.c
50
err = bpf_task_fd_query(getpid(), efd, 0, 0, &len, &prog_id,
tools/testing/selftests/bpf/prog_tests/task_fd_query_rawtp.c
62
err = bpf_task_fd_query(getpid(), efd, 0, buf, &len, &prog_id,
tools/testing/selftests/bpf/prog_tests/task_fd_query_tp.c
59
err = bpf_task_fd_query(getpid(), pmu_fd, 0, buf, &len, &prog_id,
tools/testing/selftests/bpf/prog_tests/task_kfunc.c
21
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/task_kfunc.c
77
if (getpid() != 1)
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
109
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
186
err = sched_getaffinity(getpid(), sizeof(old), &old);
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
189
err = sched_setaffinity(getpid(), sizeof(new), &new);
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
235
sched_setaffinity(getpid(), sizeof(old), &old);
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
383
task_fd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
421
task_fd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
96
task_fd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c
25
skel->rodata->local_pid = getpid();
tools/testing/selftests/bpf/prog_tests/task_under_cgroup.c
26
skel->bss->remote_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c
57
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
116
pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
167
pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c
26
skel->rodata->filter_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c
20
task_fd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/test_ima.c
25
*monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
107
task_fd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
142
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
38
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_lsm.c
44
*monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_lsm.c
76
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_mmap_inner_array.c
30
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_strncmp.c
63
skel->bss->target_pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_struct_ops_assoc.c
48
pid = getpid();
tools/testing/selftests/bpf/prog_tests/test_struct_ops_id_ops_mapping.c
46
pid = getpid();
tools/testing/selftests/bpf/prog_tests/timer_crash.c
21
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/token.c
293
lsm_skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/unpriv_bpf_disabled.c
245
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe.c
165
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe.c
213
skel->bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_autoattach.c
30
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_autoattach.c
35
skel->bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
1136
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
1179
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
1208
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
1236
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
176
child->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
209
skel->bss->pid = child ? 0 : getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
466
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
507
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
551
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
579
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
694
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/usdt.c
122
bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/usdt.c
317
bss->my_pid = getpid();
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
156
skel->bss->pid = getpid();
tools/testing/selftests/bpf/prog_tests/user_ringbuf.c
46
entry->pid = getpid();
tools/testing/selftests/bpf/prog_tests/varlen.c
34
bss->test_pid = getpid();
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
313
skel->bss->monitored_pid = getpid();
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
517
pid = getpid();
tools/testing/selftests/bpf/test_tag.c
98
snprintf(buff, sizeof(buff), "/proc/%d/fdinfo/%d", getpid(),
tools/testing/selftests/bpf/urandom_read.c
83
fprintf(stdout, "%d\n", getpid());
tools/testing/selftests/bpf/veristat.c
1422
err = write_one_line(buf, "%d\n", getpid());
tools/testing/selftests/bpf/veristat.c
1475
snprintf(buf, sizeof(buf), "%s/veristat-accounting-%d", cgroup_fs_mount, getpid());
tools/testing/selftests/bpf/veristat.c
1484
err = write_one_line(buf, "%d\n", getpid());
tools/testing/selftests/breakpoints/breakpoint_test.c
141
kill(getpid(), SIGUSR1);
tools/testing/selftests/breakpoints/breakpoint_test.c
216
kill(getpid(), SIGUSR1);
tools/testing/selftests/breakpoints/breakpoint_test.c
261
kill(getpid(), SIGUSR1);
tools/testing/selftests/capabilities/test_execve.c
187
if (getpid() != mpid)
tools/testing/selftests/capabilities/test_execve.c
437
mpid = getpid();
tools/testing/selftests/cgroup/lib/cgroup_util.c
417
snprintf(buf, sizeof(buf), "%d", getpid());
tools/testing/selftests/cgroup/lib/cgroup_util.c
540
snprintf(buf, sizeof(buf), "%d", getpid());
tools/testing/selftests/cgroup/test_cpu.c
279
snprintf(buf, sizeof(buf), "%d", getpid());
tools/testing/selftests/cgroup/test_kmem.c
40
i, getpid());
tools/testing/selftests/clone3/clone3.c
119
getpid(), flags, size);
tools/testing/selftests/clone3/clone3.c
122
getpid(), ret, expected);
tools/testing/selftests/clone3/clone3.c
126
getpid(), ret, expected);
tools/testing/selftests/clone3/clone3.c
90
ksft_print_msg("I am the child, my PID is %d\n", getpid());
tools/testing/selftests/clone3/clone3.c
95
getpid(), pid);
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
151
TH_LOG("Child has PID %d", getpid());
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
59
TH_LOG("I am the child, my PID is %d (expected %d)", getpid(), set_tid[0]);
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
61
if (set_tid[0] != getpid())
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
66
TH_LOG("I am the parent (%d). My child's pid is %d", getpid(), pid);
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
84
TH_LOG("[%d] Trying clone3() with CLONE_SET_TID to %d", getpid(), set_tid[0]);
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c
86
TH_LOG("[%d] clone3() with CLONE_SET_TID %d says:%d", getpid(), set_tid[0], ret);
tools/testing/selftests/clone3/clone3_set_tid.c
129
getpid(), set_tid[0], flags);
tools/testing/selftests/clone3/clone3_set_tid.c
134
getpid(), set_tid[0], ret, expected);
tools/testing/selftests/clone3/clone3_set_tid.c
272
ksft_print_msg("Child has PID %d\n", getpid());
tools/testing/selftests/clone3/clone3_set_tid.c
325
ksft_print_msg("Child in PID namespace has PID %d\n", getpid());
tools/testing/selftests/clone3/clone3_set_tid.c
361
ksft_print_msg("[%d] Child is ready and waiting\n", getpid());
tools/testing/selftests/clone3/clone3_set_tid.c
67
getpid(), set_tid[0]);
tools/testing/selftests/clone3/clone3_set_tid.c
70
getpid());
tools/testing/selftests/clone3/clone3_set_tid.c
91
if (set_tid[0] != getpid())
tools/testing/selftests/clone3/clone3_set_tid.c
98
getpid(), pid);
tools/testing/selftests/connector/proc_filter.c
54
hdr->nlmsg_pid = getpid();
tools/testing/selftests/connector/proc_filter.c
98
sa_nl.nl_pid = getpid();
tools/testing/selftests/filesystems/file_stressor.c
120
self->pids_openers[i] = getpid();
tools/testing/selftests/filesystems/file_stressor.c
153
self->pids_getdents[i] = getpid();
tools/testing/selftests/iommu/iommufd.c
293
pid_t parent = getpid();
tools/testing/selftests/iommu/iommufd.c
318
ASSERT_EQ(0, get_vm_pinned(getpid()));
tools/testing/selftests/iommu/iommufd.c
319
ASSERT_EQ(0, get_vm_locked(getpid()));
tools/testing/selftests/iommu/iommufd.c
326
ASSERT_EQ(nlock, get_vm_pinned(getpid()));
tools/testing/selftests/iommu/iommufd.c
328
ASSERT_EQ(nlock, get_vm_locked(getpid()));
tools/testing/selftests/iommu/iommufd_fail_nth.c
97
snprintf(buf, sizeof(buf), "/proc/self/task/%u/fail-nth", getpid());
tools/testing/selftests/kcmp/kcmp_test.c
43
pid1 = getpid();
tools/testing/selftests/kcmp/kcmp_test.c
88
int pid2 = getpid();
tools/testing/selftests/kselftest_harness.h
459
kill(getpid(), WTERMSIG(status)); \
tools/testing/selftests/kselftest_harness/harness-selftest.c
107
self->testpid = getpid();
tools/testing/selftests/kselftest_harness/harness-selftest.c
112
TH_LOG("teardown same-process=%d", self->testpid == getpid());
tools/testing/selftests/kselftest_harness/harness-selftest.c
38
kill(getpid(), SIGUSR1);
tools/testing/selftests/kselftest_harness/harness-selftest.c
45
kill(getpid(), SIGUSR1);
tools/testing/selftests/kselftest_harness/harness-selftest.c
54
self->testpid = getpid();
tools/testing/selftests/kselftest_harness/harness-selftest.c
58
TH_LOG("teardown same-process=%d", self->testpid == getpid());
tools/testing/selftests/kselftest_harness/harness-selftest.c
88
self->testpid = getpid();
tools/testing/selftests/kselftest_harness/harness-selftest.c
92
TH_LOG("teardown same-process=%d", self->testpid == getpid());
tools/testing/selftests/kvm/lib/assert.c
78
file, line, exp_str, getpid(), _gettid(),
tools/testing/selftests/landlock/audit.h
384
err = audit_set_status(fd, AUDIT_STATUS_PID, getpid());
tools/testing/selftests/landlock/audit_test.c
109
self->audit_fd, getpid(),
tools/testing/selftests/landlock/audit_test.c
174
if (getpid() == gettid()) {
tools/testing/selftests/landlock/audit_test.c
242
EXPECT_EQ(getpid(), gettid());
tools/testing/selftests/landlock/audit_test.c
257
EXPECT_EQ(0, matches_log_domain_allocated(self->audit_fd, getpid(),
tools/testing/selftests/landlock/audit_test.c
396
self->audit_fd, getpid(),
tools/testing/selftests/landlock/audit_test.c
617
getpid(), NULL));
tools/testing/selftests/landlock/audit_test.c
635
getpid(), NULL));
tools/testing/selftests/landlock/audit_test.c
664
getpid(), NULL));
tools/testing/selftests/landlock/fs_test.c
7462
matches_log_domain_allocated(self->audit_fd, getpid(), NULL));
tools/testing/selftests/landlock/ptrace_test.c
168
parent = getpid();
tools/testing/selftests/landlock/ptrace_test.c
379
getpid()));
tools/testing/selftests/landlock/scoped_signal_test.c
175
pid_t parent = getpid();
tools/testing/selftests/landlock/scoped_signal_test.c
84
pid_t parent = getpid();
tools/testing/selftests/mm/hugetlb_fault_after_madv.c
68
srand(getpid());
tools/testing/selftests/mm/map_fixed_noreplace.c
21
snprintf(cmd, sizeof(cmd), "cat /proc/%d/maps", getpid());
tools/testing/selftests/mm/migration.c
169
kill(getpid(), SIGHUP);
tools/testing/selftests/mm/migration.c
241
kill(getpid(), SIGHUP);
tools/testing/selftests/mm/migration.c
301
kill(getpid(), SIGHUP);
tools/testing/selftests/mm/mremap_dontunmap.c
26
snprintf(cmd, sizeof(cmd), "cat /proc/%d/maps", getpid());
tools/testing/selftests/mm/process_madv.c
168
info.pid = getpid();
tools/testing/selftests/mm/protection_keys.c
1125
dprintf3("[%d] fork() ret: %d\n", getpid(), forkret);
tools/testing/selftests/mm/protection_keys.c
113
sprintf(pidstr, "%d", getpid());
tools/testing/selftests/mm/protection_keys.c
1323
dprintf1("[%d] child pid: %d\n", getpid(), child_pid);
tools/testing/selftests/mm/protection_keys.c
1328
dprintf1("[%d] attach ret: %ld %d\n", getpid(), ret, __LINE__);
tools/testing/selftests/mm/protection_keys.c
1499
dprintf3("[%d] fork() ret: %d\n", getpid(), child);
tools/testing/selftests/mm/protection_keys.c
1525
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1557
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1584
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1596
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1617
dprintf3("[%d] fork() ret: %d\n", getpid(), child);
tools/testing/selftests/mm/protection_keys.c
1637
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1663
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
1675
dprintf3("[%d] waitpid(%d) status: %x\n", getpid(), child, status);
tools/testing/selftests/mm/protection_keys.c
409
dprintf2("[%d] SIGCHLD: %d\n", getpid(), x);
tools/testing/selftests/mm/protection_keys.c
451
dprintf3("[%d] fork() ret: %d\n", getpid(), forkret);
tools/testing/selftests/mm/rmap.c
144
if (getpid() == root_pid) {
tools/testing/selftests/mm/rmap.c
90
root_pid = getpid();
tools/testing/selftests/mm/split_huge_page_test.c
321
write_debugfs(PID_FMT, getpid(), (uint64_t)one_page,
tools/testing/selftests/mm/split_huge_page_test.c
368
write_debugfs(PID_FMT, getpid(), (uint64_t)one_page,
tools/testing/selftests/mm/split_huge_page_test.c
454
write_debugfs(PID_FMT, getpid(), (uint64_t)page_area,
tools/testing/selftests/mm/split_huge_page_test.c
704
write_debugfs(PID_FMT, getpid(), (uint64_t)split_addr,
tools/testing/selftests/mm/split_huge_page_test.c
712
write_debugfs(PID_FMT_OFFSET, getpid(), (uint64_t)split_addr,
tools/testing/selftests/mm/vm_util.h
120
pid_t pid = getpid();
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1183
return kill(getpid(), SIGSTOP);
tools/testing/selftests/nci/nci_dev.c
417
self->pid = getpid();
tools/testing/selftests/net/af_unix/msg_oob.c
91
int pid = getpid();
tools/testing/selftests/net/af_unix/scm_pidfd.c
378
snprintf(addr->sock_name, sizeof(addr->sock_name), "scm_pidfd_%d", getpid());
tools/testing/selftests/net/ipsec.c
40
ksft_print_msg("%d[%u] " fmt "\n", getpid(), __LINE__, ##__VA_ARGS__)
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1168
pid_t pid = getpid();
tools/testing/selftests/net/netfilter/audit_logread.c
161
audit_set(fd, AUDIT_STATUS_PID, getpid());
tools/testing/selftests/nolibc/nolibc-test.c
1374
CASE_TEST(getpid); EXPECT_SYSNE(1, getpid(), -1); break;
tools/testing/selftests/nolibc/nolibc-test.c
1379
CASE_TEST(kill_0); EXPECT_SYSZR(1, kill(getpid(), 0)); break;
tools/testing/selftests/nolibc/nolibc-test.c
1380
CASE_TEST(kill_CONT); EXPECT_SYSZR(1, kill(getpid(), 0)); break;
tools/testing/selftests/nolibc/nolibc-test.c
1456
CASE_TEST(waitpid_child); EXPECT_SYSER(1, waitpid(getpid(), &tmp, WNOHANG), -1, ECHILD); break;
tools/testing/selftests/nolibc/nolibc-test.c
1463
CASE_TEST(ptrace); EXPECT_SYSER(1, ptrace(PTRACE_CONT, getpid(), NULL, NULL), -1, ESRCH); break;
tools/testing/selftests/nolibc/nolibc-test.c
1464
CASE_TEST(syscall_noargs); EXPECT_SYSEQ(1, syscall(__NR_getpid), getpid()); break;
tools/testing/selftests/nolibc/nolibc-test.c
2007
if (getpid() == 1)
tools/testing/selftests/nolibc/nolibc-test.c
2087
if (getpid() == 1) {
tools/testing/selftests/openat2/resolve_test.c
128
E_asprintf(&procselfexe, "/proc/%d/exe", getpid());
tools/testing/selftests/perf_events/watermark_signal.c
94
if (fcntl(fd, F_SETOWN, getpid())) {
tools/testing/selftests/pidfd/pidfd_bind_mount.c
39
self->pidfd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
46
self->pid = getpid();
tools/testing/selftests/pidfd/pidfd_getfd_test.c
213
ret = sys_kcmp(getpid(), self->pid, KCMP_FILE, fd, self->remote_fd);
tools/testing/selftests/pidfd/pidfd_open_test.c
141
pidfd = sys_pidfd_open(getpid(), 1);
tools/testing/selftests/pidfd/pidfd_open_test.c
150
pidfd = sys_pidfd_open(getpid(), 0);
tools/testing/selftests/pidfd/pidfd_setns_test.c
111
self->pid = getpid();
tools/testing/selftests/pidfd/pidfd_setns_test.c
422
pid = getpid();
tools/testing/selftests/pidfd/pidfd_setns_test.c
436
pid = getpid();
tools/testing/selftests/pidfd/pidfd_setns_test.c
472
pid = getpid();
tools/testing/selftests/pidfd/pidfd_setns_test.c
508
pid = getpid();
tools/testing/selftests/pidfd/pidfd_setns_test.c
561
pid = getpid();
tools/testing/selftests/pidfd/pidfd_test.c
437
getpid(), syscall(SYS_gettid));
tools/testing/selftests/pidfd/pidfd_test.c
443
getpid(), syscall(SYS_gettid));
tools/testing/selftests/pidfd/pidfd_test.c
482
ksft_print_msg("Child (pidfd): starting. pid %d tid %ld\n", getpid(),
tools/testing/selftests/pidfd/pidfd_test.c
502
ksft_print_msg("Parent: pid: %d\n", getpid());
tools/testing/selftests/pidfd/pidfd_test.c
536
getpid(), syscall(SYS_gettid));
tools/testing/selftests/pidfd/pidfd_test.c
538
ksft_print_msg("Child Thread: DONE. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
tools/testing/selftests/pidfd/pidfd_test.c
547
ksft_print_msg("Child: starting. pid %d tid %ld\n", getpid(), syscall(SYS_gettid));
tools/testing/selftests/pidfd/pidfd_test.c
575
ksft_print_msg("Parent: pid: %d\n", getpid());
tools/testing/selftests/pidfd/pidfd_wait.c
101
kill(getpid(), SIGSTOP);
tools/testing/selftests/pidfd/pidfd_wait.c
104
kill(getpid(), SIGSTOP);
tools/testing/selftests/pidfd/pidfd_wait.c
158
pidfd = sys_pidfd_open(getpid(), PIDFD_NONBLOCK);
tools/testing/selftests/pidfd/pidfd_wait.c
174
kill(getpid(), SIGSTOP);
tools/testing/selftests/powerpc/benchmarks/context_switch.c
495
setpgid(getpid(), getpid());
tools/testing/selftests/powerpc/benchmarks/fork.c
315
setpgid(getpid(), getpid());
tools/testing/selftests/powerpc/dscr/dscr_inherit_test.c
27
srand(getpid());
tools/testing/selftests/powerpc/mm/large_vm_fork_separation.c
51
pid = getpid();
tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c
69
getpid();
tools/testing/selftests/powerpc/mm/tlbie_test.c
619
key_t shm_key = (key_t) getpid();
tools/testing/selftests/powerpc/mm/tlbie_test.c
624
"/tmp/logdir-%u", (unsigned int)getpid());
tools/testing/selftests/powerpc/mm/wild_bctr.c
144
kill(getpid(), SIGUSR2);
tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c
248
getpid());
tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c
277
fprintf(stderr, "%d: Got signal %d si_code %d, si_addr %p\n", getpid(),
tools/testing/selftests/powerpc/nx-gzip/include/nx_dbg.h
40
(int)getpid(), ## __VA_ARGS__); \
tools/testing/selftests/powerpc/pmu/lib.c
126
printf("main test running as pid %d\n", getpid());
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcr2_fcs_fch_test.c
40
FAIL_IF(kill(getpid(), SIGUSR2));
tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c
79
return syscall(__NR_perf_event_open, &attr, getpid(), -1, -1, 0);
tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c
821
kill(getpid(), SIGUSR1);
tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c
87
return syscall(__NR_perf_event_open, &attr, getpid(), -1, -1, 0);
tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c
123
seed = getpid() ^ time(NULL);
tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
127
kill(getpid(), SIGUSR1);
tools/testing/selftests/powerpc/ptrace/ptrace-syscall.c
77
pid_t pid = getpid(), tid = syscall(SYS_gettid);
tools/testing/selftests/powerpc/signal/sig_sc_double_restart.c
36
kill(getpid(), SIGUSR2);
tools/testing/selftests/powerpc/signal/sigfuz.c
226
srand(time(NULL) + getpid());
tools/testing/selftests/powerpc/signal/signal.c
40
pid_t ppid = getpid();
tools/testing/selftests/powerpc/signal/signal_tm.c
73
rc = tm_signal_self(getpid(), SIGUSR1, &ret);
tools/testing/selftests/powerpc/signal/sigreturn_vdso.c
101
kill(getpid(), SIGUSR1);
tools/testing/selftests/powerpc/signal/sigreturn_vdso.c
117
kill(getpid(), SIGUSR1);
tools/testing/selftests/powerpc/signal/sigreturn_vdso.c
89
kill(getpid(), SIGUSR1);
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-fpu.c
79
pid_t pid = getpid();
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-gpr.c
81
pid_t pid = getpid();
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-vmx.c
104
pid_t pid = getpid();
tools/testing/selftests/powerpc/tm/tm-signal-context-chk-vsx.c
153
pid_t pid = getpid();
tools/testing/selftests/prctl/set-process-name.c
56
pid = getpid();
tools/testing/selftests/ptrace/get_set_sud.c
31
kill(getpid(), SIGSTOP);
tools/testing/selftests/ptrace/get_syscall_info.c
85
pid = getpid();
tools/testing/selftests/ptrace/set_syscall_info.c
131
const pid_t tracer_pid = getpid();
tools/testing/selftests/ptrace/set_syscall_info.c
334
tracee_pid = getpid();
tools/testing/selftests/resctrl/cat_test.c
172
bm_pid = getpid();
tools/testing/selftests/resctrl/resctrl_val.c
559
ppid = getpid();
tools/testing/selftests/riscv/cfi/shadowstack.c
97
parent_pid = getpid();
tools/testing/selftests/riscv/vector/vstate_ptrace.c
120
srandom(getpid());
tools/testing/selftests/rlimits/rlimits-per-userns.c
32
pid_t pid = getpid();
tools/testing/selftests/rlimits/rlimits-per-userns.c
54
pid = getpid();
tools/testing/selftests/rlimits/rlimits-per-userns.c
99
pid = getpid();
tools/testing/selftests/rseq/param_test.c
449
getpid(), (int) rseq_gettid(), rseq_current_cpu_raw(), cpu);
tools/testing/selftests/sched/cs_prctl_test.c
205
printf("tid=%d, / tgid=%d / pgid=%d: %lx\n", gettid(), getpid(), getpgid(0),
tools/testing/selftests/sched/cs_prctl_test.c
206
get_cs_cookie(getpid()));
tools/testing/selftests/sched/cs_prctl_test.c
309
getpid(), pid);
tools/testing/selftests/sched/cs_prctl_test.c
319
procs[pidx].thr_tids[0], getpid());
tools/testing/selftests/sched/cs_prctl_test.c
328
printf("\n## Copy cookie from current [%d] to current as pidtype PGID\n", getpid());
tools/testing/selftests/sched_ext/allowed_cpus.c
36
args[0] = getpid();
tools/testing/selftests/sched_ext/enq_select_cpu.c
38
args[0] = getpid();
tools/testing/selftests/seccomp/seccomp_benchmark.c
155
if (sched_setaffinity(getpid(), setsz, setp) == -1)
tools/testing/selftests/seccomp/seccomp_benchmark.c
31
pid = getpid();
tools/testing/selftests/seccomp/seccomp_benchmark.c
61
pid = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
1477
mypid = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
1497
mypid = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
1613
pid_t tracee = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
2171
self->mypid = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
352
ret = __filecmp(getpid(), getpid(), 1, 1);
tools/testing/selftests/seccomp/seccomp_bpf.c
3872
self = getpid();
tools/testing/selftests/seccomp/seccomp_bpf.c
4218
EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
tools/testing/selftests/seccomp/seccomp_bpf.c
4232
EXPECT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
tools/testing/selftests/seccomp/seccomp_bpf.c
4265
ASSERT_EQ(filecmp(getpid(), pid, memfd, fd), 0);
tools/testing/selftests/seccomp/seccomp_bpf.c
5186
getpid() /* pid */, -1 /* cpu */, -1 /* group_fd */,
tools/testing/selftests/ublk/kublk.c
1171
ret = ublk_ctrl_end_user_recovery(dev, getpid());
tools/testing/selftests/ublk/kublk.c
1174
ret = ublk_ctrl_start_dev(dev, getpid());
tools/testing/selftests/uevent/uevent_filtering.c
232
self = getpid();
tools/testing/selftests/vDSO/vdso_test_getrandom.c
261
child = getpid();
tools/testing/selftests/x86/corrupt_xstate_header.c
68
sched_setaffinity(getpid(), sizeof(set), &set);
tools/testing/selftests/x86/fsgsbase_restore.c
130
pid_t pid = getpid(), tid = syscall(SYS_gettid);
tools/testing/selftests/x86/fsgsbase_restore.c
164
pid_t pid = getpid(), tid = syscall(SYS_gettid);
tools/testing/selftests/x86/mov_ss_trap.c
53
pid_t parent = getpid();
tools/testing/selftests/x86/ptrace_syscall.c
129
if (args.nr != getpid() ||
tools/testing/selftests/x86/ptrace_syscall.c
141
args.arg0 = getpid();
tools/testing/selftests/x86/ptrace_syscall.c
145
args.arg0 != getpid() || args.arg1 != SIGUSR1 || args.arg2 != 12 ||
tools/testing/selftests/x86/ptrace_syscall.c
166
pid_t pid = getpid(), tid = syscall(SYS_gettid);
tools/testing/selftests/x86/ptrace_syscall.c
286
pid_t pid = getpid(), tid = syscall(SYS_gettid);
tools/testing/selftests/x86/syscall_numbering.c
230
pid_t mypid = getpid();
tools/testing/selftests/x86/test_vsyscall.c
396
ret = process_vm_readv(getpid(), &local, 1, &remote, 1, 0);
tools/testing/selftests/x86/unwind_vdso.c
78
bool ok = (eax == SYS_getpid || eax == getpid()) &&
tools/testing/vsock/vsock_test.c
1983
pid_t pid = getpid();
tools/tracing/latency/latency-collector.c
1040
pid = getpid();
tools/tracing/rtla/src/common.c
143
retval = sched_setaffinity(getpid(), sizeof(params->hk_cpu_set),
tools/tracing/rtla/src/timerlat_u.c
57
retval = __set_sched_attr(getpid(), params->sched_param);
tools/tracing/rtla/src/utils.c
746
snprintf(path, MAX_PATH, "/proc/%d/cgroup", getpid());
tools/tracing/rtla/src/utils.c
949
retval = sched_getaffinity(getpid(), sizeof(rtla_cpus), &rtla_cpus);
tools/tracing/rtla/src/utils.c
975
retval = sched_setaffinity(getpid(), sizeof(house_keeping_cpus), &house_keeping_cpus);
tools/usb/usbip/src/usbipd.c
478
fprintf(fp, "%d\n", getpid());
tools/verification/rv/src/in_kernel.c
708
config_my_pid = getpid();
tools/virtio/vhost_net_test.c
518
snprintf(tun_name, IFNAMSIZ, "tun_%d", getpid());
tools/virtio/vringh_test.c
101
if (sched_setaffinity(getpid(), sizeof(set), &set) == 0) {
tools/virtio/vringh_test.c
195
if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set))
tools/virtio/vringh_test.c
319
if (sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set))