Home
last modified time | relevance | path

Searched refs:pid (Results 326 - 350 of 6205) sorted by relevance

1...<<11121314151617181920>>...249

/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
H A Dtest_map_ops.c29 const volatile pid_t pid; variable
43 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_update()
56 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_delete()
69 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_push()
82 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_pop()
95 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_peek()
111 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_for_each_pass()
129 if (pid != (bpf_get_current_pid_tgid() >> 32)) in map_for_each_fail()
/kernel/liteos_a/testsuites/unittest/container/full/
H A DIt_pid_container_005.cpp35 auto pid = getpid(); in ChildFunClone3() local
36 if (pid != CONTAINER_SECOND_PID) { in ChildFunClone3()
45 auto pid = getpid(); in ChildFunClone2() local
46 if (pid != CONTAINER_FIRST_PID) { in ChildFunClone2()
78 const char *containerType = "pid"; in ChildFunClone1()
81 auto pid = getpid(); in ChildFunClone1() local
87 if (pid != pid1) { in ChildFunClone1()
91 auto linkBuffer = ReadlinkContainer(pid, containerType); in ChildFunClone1()
92 auto linkBuffer1 = ReadlinkContainer(pid, containerType1); in ChildFunClone1()
H A DIt_pid_container_019.cpp38 pid_t pid = (pid_t)(uintptr_t)p; in ChildShell() local
40 int ret = snprintf_s(param, TEST_CMD_LEN, TEST_CMD_LEN - 1, "-p %d", pid); in ChildShell()
45 printf("\n###################### Pid %d thread info ####################\n", pid); in ChildShell()
92 pid_t pid; in ItPidContainer019() local
101 pid = fork(); in ItPidContainer019()
102 if (pid == 0) { in ItPidContainer019()
107 ret = waitpid(pid, &status, 0); in ItPidContainer019()
108 ASSERT_EQ(ret, pid); in ItPidContainer019()
/kernel/liteos_a/testsuites/unittest/container/smoke/
H A DIt_pid_container_030.cpp35 auto pid = getpid(); in ChildFunClone3() local
36 if (pid != CONTAINER_SECOND_PID) { in ChildFunClone3()
46 auto pid = getpid(); in ChildFunClone2() local
47 if (pid != CONTAINER_FIRST_PID) { in ChildFunClone2()
58 const char *containerType = "pid"; in ChildFunClone1()
61 auto pid = getpid(); in ChildFunClone1() local
67 if (pid != pid1) { in ChildFunClone1()
71 auto linkBuffer = ReadlinkContainer(pid, containerType); in ChildFunClone1()
72 auto linkBuffer1 = ReadlinkContainer(pid, containerType1); in ChildFunClone1()
H A DIt_pid_container_028.cpp35 auto pid = getpid(); in ChildFunClone3() local
36 if (pid != CONTAINER_SECOND_PID) { in ChildFunClone3()
45 auto pid = getpid(); in ChildFunClone2() local
46 if (pid != CONTAINER_FIRST_PID) { in ChildFunClone2()
79 const char *containerType = "pid"; in ChildFunClone1()
82 auto pid = getpid(); in ChildFunClone1() local
88 if (pid != pid1) { in ChildFunClone1()
92 auto linkBuffer = ReadlinkContainer(pid, containerType); in ChildFunClone1()
93 auto linkBuffer1 = ReadlinkContainer(pid, containerType1); in ChildFunClone1()
H A DIt_pid_container_029.cpp35 auto pid = getpid(); in ChildFunClone3() local
36 if (pid != CONTAINER_FIRST_PID) { in ChildFunClone3()
45 auto pid = getpid(); in ChildFunClone2() local
46 if (pid != CONTAINER_FIRST_PID) { in ChildFunClone2()
57 const char *containerType = "pid"; in ChildFunClone1()
60 auto pid = getpid(); in ChildFunClone1() local
66 if (pid != pid1) { in ChildFunClone1()
70 auto linkBuffer = ReadlinkContainer(pid, containerType); in ChildFunClone1()
71 auto linkBuffer1 = ReadlinkContainer(pid, containerType1); in ChildFunClone1()
H A DIt_user_container_003.cpp38 std::string GetIdMapPath(int pid, const std::string& mapType);
39 int WriteIdMap(int pid);
43 pid_t pid = getpid(); in TestMap() local
44 int ret = WriteIdMap(pid); in TestMap()
134 auto pid = CloneWrapper(childFunc, SIGCHLD, &arg); in ItUserContainer003() local
135 ASSERT_NE(pid, -1); in ItUserContainer003()
137 ret = waitpid(pid, &status, 0); in ItUserContainer003()
138 ASSERT_EQ(ret, pid); in ItUserContainer003()
/kernel/liteos_a/testsuites/unittest/process/basic/process/smoke/
H A Dprocess_test_010.cpp41 int pid; in ProcessTest001() local
69 int pid = ret; in Child() local
72 if (ret != pid) { in Child()
73 printf("wait child %d failed, is %d!\n", pid, ret); in Child()
95 int pid; in Testcase() local
107 pid = ret; in Testcase()
108 ret = waitpid(pid, &status, 0); in Testcase()
110 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
H A Dprocess_test_044.cpp47 pid_t pid, pid1; in GroupProcess() local
77 pid_t pid, pid1; in TestCase() local
79 pid = fork(); in TestCase()
80 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, assert pid equal to this. in TestCase()
82 if (pid == 0) { in TestCase()
89 ret = waitpid(pid, &status, 0); in TestCase()
90 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestCase()
/test/xts/hats/kernel/syscalls/schedule/priority/
H A DPriorityApiTest.cpp66 int pid = 0; in HWTEST_F() local
67 int ret = setpriority(PRIO_PROCESS, pid, TEST_PRIO); in HWTEST_F()
70 int prio = getpriority(PRIO_PROCESS, pid); in HWTEST_F()
73 ret = setpriority(PRIO_PGRP, pid, TEST_PRIO); in HWTEST_F()
76 prio = getpriority(PRIO_PGRP, pid); in HWTEST_F()
96 int pid = getpid(); in HWTEST_F() local
98 int ret = setpriority(-1, pid, TEST_PRIO); in HWTEST_F()
103 int prio = getpriority(-1, pid); in HWTEST_F()
/third_party/ltp/testcases/kernel/mem/tunable/
H A Dmax_map_count.c24 * Each process has his own maps file: /proc/[pid]/maps, and each line
29 * then reads the process's maps file /proc/[pid]/maps, save the line number to
35 * architectures each /proc/<pid>/maps has at the end:
40 * so we ignore this line during /proc/[pid]/maps reading.
96 static long count_maps(pid_t pid) in count_maps() argument
104 snprintf(buf, BUFSIZ, "/proc/%d/maps", pid); in count_maps()
122 pid_t pid; in max_map_count_test() local
153 switch (pid = SAFE_FORK()) { in max_map_count_test()
165 SAFE_WAITPID(pid, &status, WUNTRACED); in max_map_count_test()
169 map_count = count_maps(pid); in max_map_count_test()
[all...]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/
H A D1-1.c67 int pid; in main() local
97 pid = fork(); in main()
98 if (pid == 0) in main()
101 if (pid < 0) { in main()
109 kill(pid, SIGTERM); in main()
110 waitpid(pid, NULL, 0); in main()
116 kill(pid, SIGTERM); in main()
117 waitpid(pid, &s, 0); in main()
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Dexit.c35 pid_t pid; in exit_0100() local
36 pid = fork(); in exit_0100()
37 if (pid < 0) { in exit_0100()
40 } else if (pid == 0) { in exit_0100()
74 pid_t pid; in exit_0200() local
75 pid = fork(); in exit_0200()
76 if (pid < 0) { in exit_0200()
79 } else if (pid == 0) { in exit_0200()
/third_party/skia/third_party/externals/abseil-cpp/absl/debugging/internal/
H A Daddress_is_readable.cc50 // Pack a pid and two file descriptors into a 64-bit word,
52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
58 // Unpack x into a pid and two file descriptors, where x was created with
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
61 *pid = x >> 48; in Unpack()
70 static std::atomic<uint64_t> pid_and_fds; // initially 0, an invalid pid.
77 // we use a cached pipe. We store the pid of the process that created the in AddressIsReadable()
87 int pid; in AddressIsReadable() local
91 Unpack(local_pid_and_fds, &pid, in AddressIsReadable()
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/breakpoints/
H A Dstep_after_suspend_test.c53 pid_t pid = fork(); in run_test() local
56 if (pid < 0) { in run_test()
60 if (pid == 0) in run_test()
63 wpid = waitpid(pid, &status, __WALL); in run_test()
64 if (wpid != pid) { in run_test()
78 if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) < 0) { in run_test()
90 wpid = waitpid(pid, &status, __WALL); in run_test()
91 if (wpid != pid) { in run_test()
110 if (ptrace(PTRACE_CONT, pid, NULL, NULL) < 0) { in run_test()
116 wpid = waitpid(pid, in run_test()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/
H A Dhardware_disable_test.c124 void wait_for_child_setup(pid_t pid) in wait_for_child_setup() argument
138 if (pid != waitpid(pid, &status, WNOHANG)) in wait_for_child_setup()
158 pid_t pid; in main() local
164 pid = fork(); in main()
165 TEST_ASSERT(pid >= 0, "%s: unable to fork", __func__); in main()
166 if (pid == 0) in main()
170 wait_for_child_setup(pid); in main()
174 r = waitpid(pid, &s, WNOHANG); in main()
175 TEST_ASSERT(r != pid, in main()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/breakpoints/
H A Dstep_after_suspend_test.c53 pid_t pid = fork(); in run_test() local
56 if (pid < 0) { in run_test()
60 if (pid == 0) in run_test()
63 wpid = waitpid(pid, &status, __WALL); in run_test()
64 if (wpid != pid) { in run_test()
78 if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) < 0) { in run_test()
90 wpid = waitpid(pid, &status, __WALL); in run_test()
91 if (wpid != pid) { in run_test()
110 if (ptrace(PTRACE_CONT, pid, NULL, NULL) < 0) { in run_test()
116 wpid = waitpid(pid, in run_test()
[all...]
/kernel/linux/linux-6.6/tools/bpf/bpftool/
H A Dperf.c65 static void print_perf_json(int pid, int fd, __u32 prog_id, __u32 fd_type, in print_perf_json() argument
69 jsonw_int_field(json_wtr, "pid", pid); in print_perf_json()
115 static void print_perf_plain(int pid, int fd, __u32 prog_id, __u32 fd_type, in print_perf_plain() argument
118 printf("pid %d fd %d: prog_id %u ", pid, fd, prog_id); in print_perf_plain()
158 int err, pid, fd; in show_proc() local
167 pid = 0; in show_proc()
170 /* pid should be all numbers */ in show_proc()
172 pid in show_proc()
[all...]
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/
H A Dcpuset_memory_spread_testset.sh259 local pid=
267 pid=$!
268 general_memory_spread_test "$@" "$pid"
274 /bin/kill -s SIGUSR2 $pid
275 wait $pid
306 local pid=
314 pid=$!
315 general_memory_spread_test "1" "$cpus_all" "0" "0" "$pid"
320 general_memory_spread_test "1" "$cpus_all" "1" "1" "$pid"
327 /bin/kill -s SIGUSR2 $pid
[all...]
/third_party/toybox/toys/other/
H A Dwatch.c32 pid_t pid, oldpid;
39 pid_t pid = wait(&status); in watch_child() local
52 if (pid == TT.oldpid) TT.oldpid = 0; in watch_child()
53 else if (pid == TT.pid) TT.pid = 0; in watch_child()
72 pid_t pid = 0; in watch_main() local
122 if (TT.pid>0) kill(TT.pid, SIGTERM); in watch_main()
123 TT.oldpid = pid; in watch_main()
[all...]
/kernel/linux/linux-5.10/fs/proc/
H A Darray.c34 * and /proc/<pid>/cpu extension
152 struct pid *pid, struct task_struct *p) in task_state()
189 seq_put_decimal_ull(m, "\nPid:\t", pid_nr_ns(pid, ns)); in task_state()
213 for (g = ns->level; g <= pid->level; g++) in task_state()
214 seq_put_decimal_ull(m, "\t", task_tgid_nr_ns(p, pid->numbers[g].ns)); in task_state()
216 for (g = ns->level; g <= pid->level; g++) in task_state()
217 seq_put_decimal_ull(m, "\t", task_pid_nr_ns(p, pid->numbers[g].ns)); in task_state()
219 for (g = ns->level; g <= pid->level; g++) in task_state()
220 seq_put_decimal_ull(m, "\t", task_pgrp_nr_ns(p, pid in task_state()
151 task_state(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *p) task_state() argument
407 proc_pid_status(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_pid_status() argument
433 do_task_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task, int whole) do_task_stat() argument
639 proc_tid_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_tid_stat() argument
645 proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_tgid_stat() argument
651 proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_pid_statm() argument
691 struct pid *pid = NULL; get_children_pid() local
758 struct pid *pid; children_seq_next() local
[all...]
/kernel/linux/linux-6.6/fs/proc/
H A Darray.c34 * and /proc/<pid>/cpu extension
149 struct pid *pid, struct task_struct *p) in task_state()
186 seq_put_decimal_ull(m, "\nPid:\t", pid_nr_ns(pid, ns)); in task_state()
210 for (g = ns->level; g <= pid->level; g++) in task_state()
211 seq_put_decimal_ull(m, "\t", task_tgid_nr_ns(p, pid->numbers[g].ns)); in task_state()
213 for (g = ns->level; g <= pid->level; g++) in task_state()
214 seq_put_decimal_ull(m, "\t", task_pid_nr_ns(p, pid->numbers[g].ns)); in task_state()
216 for (g = ns->level; g <= pid->level; g++) in task_state()
217 seq_put_decimal_ull(m, "\t", task_pgrp_nr_ns(p, pid in task_state()
148 task_state(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *p) task_state() argument
439 proc_pid_status(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_pid_status() argument
467 do_task_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task, int whole) do_task_stat() argument
664 proc_tid_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_tid_stat() argument
670 proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_tgid_stat() argument
676 proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) proc_pid_statm() argument
716 struct pid *pid = NULL; get_children_pid() local
783 struct pid *pid; children_seq_next() local
[all...]
/kernel/linux/linux-5.10/kernel/
H A Dexit.c240 struct pid *thread_pid; in release_task()
324 static int will_become_orphaned_pgrp(struct pid *pgrp, in will_become_orphaned_pgrp()
354 static bool has_stopped_jobs(struct pid *pgrp) in has_stopped_jobs()
374 struct pid *pgrp = task_pgrp(tsk); in kill_orphaned_pgrp()
594 * 3. give it to the init process (PID 1) in our pid namespace
612 * We check pid->level, this is slightly more efficient than in find_new_reaper()
786 if (unlikely(!tsk->pid)) in do_exit()
1013 pid_t pid; member
1022 struct pid *wo_pid;
1074 pid_t pid in wait_task_zombie() local
1236 pid_t pid; wait_task_stopped() local
1305 pid_t pid; wait_task_continued() local
1574 struct pid *pid = NULL; kernel_waitid() local
1673 struct pid *pid = NULL; kernel_wait4() local
1712 kernel_wait(pid_t pid, int *stat) kernel_wait() argument
1822 thread_group_exited(struct pid *pid) thread_group_exited() argument
[all...]
/third_party/node/deps/openssl/openssl/util/perl/TLSProxy/
H A DProxy.pm216 my $pid;
249 $pid = open(STDIN, "$execcmd 2>&1 |") or die "Failed to $execcmd: $!\n";
250 $self->{real_serverpid} = $pid;
265 waitpid($pid, 0);
274 $pid = undef;
277 $pid = $h->GetProcessID();
283 if (defined($pid = fork)) {
284 $pid or exec("$^X -ne print") or exit($!);
294 if (!defined($pid)) {
299 $self->{serverpid} = $pid;
[all...]
/third_party/openssl/util/perl/TLSProxy/
H A DProxy.pm216 my $pid;
249 $pid = open(STDIN, "$execcmd 2>&1 |") or die "Failed to $execcmd: $!\n";
250 $self->{real_serverpid} = $pid;
265 waitpid($pid, 0);
274 $pid = undef;
277 $pid = $h->GetProcessID();
283 if (defined($pid = fork)) {
284 $pid or exec("$^X -ne print") or exit($!);
294 if (!defined($pid)) {
299 $self->{serverpid} = $pid;
[all...]

Completed in 11 milliseconds

1...<<11121314151617181920>>...249