/third_party/musl/src/process/ |
H A D | posix_spawn.c | 175 pid_t pid; in posix_spawn() local 200 pid = __clone(child, stack+sizeof stack, in posix_spawn() 205 if (pid > 0) { in posix_spawn() 207 else waitpid(pid, &(int){0}, 0); in posix_spawn() 209 ec = -pid; in posix_spawn() 214 if (!ec && res) *res = pid; in posix_spawn()
|
/third_party/musl/porting/liteos_a/user/src/process/ |
H A D | posix_spawn.c | 170 pid_t pid; in posix_spawn() local 196 pid = __clone(child, stack+sizeof stack, in posix_spawn() 201 if (pid > 0) { in posix_spawn() 203 else waitpid(pid, &(int){0}, 0); in posix_spawn() 205 ec = -pid; in posix_spawn() 210 if (!ec && res) *res = pid; in posix_spawn()
|
/third_party/ltp/testcases/kernel/syscalls/connect/ |
H A D | connect01.c | 177 pid_t pid; variable 183 pid = start_server(&sin1); in setup() 203 (void)kill(pid, SIGKILL); in cleanup() 242 pid_t pid; in start_server() local 264 switch ((pid = FORK_OR_VFORK())) { in start_server() 277 return pid; in start_server()
|
/third_party/ltp/testcases/kernel/syscalls/recv/ |
H A D | recv01.c | 160 pid_t pid; variable 166 pid = start_server(&sin1); in setup() 173 (void)kill(pid, SIGKILL); in cleanup() 221 pid_t pid; in start_server() local 243 switch ((pid = FORK_OR_VFORK())) { in start_server() 258 return pid; in start_server()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | posix-timers.h | 18 * The most significant 29 bits hold either a pid or a file descriptor. 40 static inline clockid_t make_process_cpuclock(const unsigned int pid, in make_process_cpuclock() argument 43 return ((~pid) << 3) | clock; in make_process_cpuclock() 67 * @pid: Pointer to target task PID 75 struct pid *pid; member 210 * @it_pid: The pid of the process/task targeted by the signal 232 struct pid *it_pid;
|
/kernel/linux/linux-5.10/tools/perf/arch/x86/tests/ |
H A D | rdpmc.c | 165 int pid; in test__rdpmc() local 167 pid = fork(); in test__rdpmc() 168 if (pid < 0) in test__rdpmc() 171 if (!pid) { in test__rdpmc() 177 wret = waitpid(pid, &status, 0); in test__rdpmc()
|
/kernel/linux/linux-5.10/tools/perf/tests/ |
H A D | attr.c | 67 static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, in store_event() argument 96 __WRITE_ASS(pid, "d", pid); in store_event() 146 void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, in test_attr__open() argument 151 if ((fd != -1) && store_event(attr, pid, cpu, fd, group_fd, flags)) { in test_attr__open()
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | posix-timers.h | 17 * The most significant 29 bits hold either a pid or a file descriptor. 39 static inline clockid_t make_process_cpuclock(const unsigned int pid, in make_process_cpuclock() argument 42 return ((~pid) << 3) | clock; in make_process_cpuclock() 66 * @pid: Pointer to target task PID 74 struct pid *pid; member 216 * @it_pid: The pid of the process/task targeted by the signal 238 struct pid *it_pid;
|
/kernel/linux/linux-6.6/drivers/gpu/host1x/ |
H A D | context.c | 10 #include <linux/pid.h> 120 struct pid *pid) in host1x_memory_context_alloc() 137 if (cd->owner == pid) { in host1x_memory_context_alloc() 152 free->owner = get_pid(pid); in host1x_memory_context_alloc() 118 host1x_memory_context_alloc(struct host1x *host1x, struct device *dev, struct pid *pid) host1x_memory_context_alloc() argument
|
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | attr.c | 68 static int store_event(struct perf_event_attr *attr, pid_t pid, struct perf_cpu cpu, in store_event() argument 97 __WRITE_ASS(pid, "d", pid); in store_event() 147 void test_attr__open(struct perf_event_attr *attr, pid_t pid, struct perf_cpu cpu, in test_attr__open() argument 152 if ((fd != -1) && store_event(attr, pid, cpu, fd, group_fd, flags)) { in test_attr__open()
|
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | session.h | 112 struct machine *perf_session__find_machine(struct perf_session *session, pid_t pid) in perf_session__find_machine() argument 114 return machines__find(&session->machines, pid); in perf_session__find_machine() 118 struct machine *perf_session__findnew_machine(struct perf_session *session, pid_t pid) in perf_session__findnew_machine() argument 120 return machines__findnew(&session->machines, pid); in perf_session__findnew_machine() 123 struct thread *perf_session__findnew(struct perf_session *session, pid_t pid);
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | test_bpffs.c | 147 pid_t pid; in test_test_bpffs() local 149 pid = fork(); in test_test_bpffs() 150 if (CHECK(pid == -1, "clone", "clone failed %d", errno)) in test_test_bpffs() 152 if (pid == 0) in test_test_bpffs() 154 err = waitpid(pid, &status, 0); in test_test_bpffs()
|
/third_party/elfutils/tests/ |
H A D | backtrace-subr.sh | 154 pid="`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`" 155 core="core.$pid" 164 coredumpctl --output="$core" dump $pid || rm -f $core 169 coredumpctl --output="$core" dump $pid || rm -f $core 174 coredumpctl --output="$core" dump $pid || rm -f $core
|
/third_party/ltp/testcases/kernel/controllers/cpuctl/ |
H A D | cpuctl_test02.c | 95 pid_t pid; in main() local 151 pid = getpid(); in main() 152 write_to_file(mytaskfile, "a", pid); /* Assign the task to it's group */ in main() 277 pid_t pid = getpid(); in migrate_task() local 278 return (write_to_file(target, "a", pid)); in migrate_task()
|
/third_party/musl/porting/liteos_a/user/src/misc/ |
H A D | syslog.c | 95 int pid; in _vsyslog() local 108 pid = (log_opt & LOG_PID) ? getpid() : 0; in _vsyslog() 110 priority, timebuf, &hlen, log_ident, "["+!pid, pid, "]"+!pid); in _vsyslog()
|
/third_party/musl/src/misc/ |
H A D | syslog.c | 96 int pid; in _vsyslog() local 109 pid = (log_opt & LOG_PID) ? getpid() : 0; in _vsyslog() 111 priority, timebuf, &hlen, log_ident, "["+!pid, pid, "]"+!pid); in _vsyslog()
|
/third_party/ltp/testcases/kernel/syscalls/open/ |
H A D | open12.c | 168 pid_t pid; in test_cloexec() local 181 pid = tst_fork(); in test_cloexec() 182 if (pid < 0) in test_cloexec() 185 if (pid == 0) { in test_cloexec() 192 if (wait(&status) != pid) in test_cloexec()
|
/third_party/ltp/testcases/kernel/mce-test/stress/tools/fs-metadata/ |
H A D | fs-metadata.sh | 45 for pid in $(cat $K_THREADS_PID) 47 k_log "killing k-thread $pid" 48 run_quiet kill -9 $pid 212 export K_THREADS_PID=$K_VAR/k-threads.pid 213 export K_FS_METADATA_PID=$K_VAR/fs_metadata.pid
|
/third_party/ltp/testcases/kernel/mem/hugetlb/hugeshmctl/ |
H A D | hugeshmctl01.c | 126 pid_t pid; in stat_setup_1() local 129 switch (pid = SAFE_FORK()) { in stat_setup_1() 154 * by looking at the pid of the creator, the segement size, 159 pid_t pid; in func_stat() local 162 /* check perm, pid, nattach and size */ in func_stat() 163 pid = getpid(); in func_stat() 165 if (buf.shm_cpid != pid) { in func_stat() 166 tst_res(TFAIL, "creator pid is incorrect"); in func_stat() 194 tst_res(TPASS, "pid, size, # of attaches and mode are correct " in func_stat()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/ |
H A D | 2-1.c | 46 pid_t pid; in main() local 71 pid = fork(); in main() 72 if (pid == -1) { in main() 76 if (pid == 0) { in main() 89 to_child[PIPE_WRITE], pid); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/ |
H A D | 2-2.c | 49 pid_t pid; in main() local 71 pid = fork(); in main() 72 if (pid == -1) { in main() 76 if (pid == 0) { in main() 87 to_child[PIPE_WRITE], pid); in main()
|
/kernel/linux/linux-5.10/kernel/ |
H A D | fork.c | 1165 * This changes mm's executable file (shown as symlink /proc/[pid]/exe). 1699 init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid) in init_task_pid() argument 1702 task->thread_pid = pid; in init_task_pid() 1704 task->signal->pids[type] = pid; in init_task_pid() 1727 struct pid *pidfd_pid(const struct file *file) in pidfd_pid() 1737 struct pid *pid = file->private_data; in pidfd_release() local 1740 put_pid(pid); in pidfd_release() 1751 * This function will print the pid tha 1782 struct pid *pid = f->private_data; pidfd_show_fdinfo() local 1816 struct pid *pid = file->private_data; pidfd_poll() local 1882 copy_process( struct pid *pid, int trace, int node, struct kernel_clone_args *args) copy_process() argument 2493 struct pid *pid; kernel_clone() local [all...] |
/kernel/liteos_a/kernel/base/include/ |
H A D | los_process_pri.h | 383 #define OS_PID_CHECK_INVALID(pid) (((UINT32)(pid)) >= g_processMaxNum) 385 STATIC INLINE BOOL OsProcessIDUserCheckInvalid(UINT32 pid) in OsProcessIDUserCheckInvalid() argument 387 return ((pid >= g_processMaxNum) || (pid == 0)); in OsProcessIDUserCheckInvalid() 510 * Wait for the child process specified by the pid to finish 538 extern INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 policy, const LosSchedParam *param); 539 extern INT32 OsGetProcessPriority(INT32 which, INT32 pid); 542 extern INT32 OsSetProcessGroupID(UINT32 pid, UINT32 gid); 548 extern INT32 OsSendSignalToProcessGroup(INT32 pid, siginfo_ [all...] |
/kernel/liteos_a/kernel/base/misc/ |
H A D | task_shellcmd.c | 144 SHOW("%5u%6u%5d%6d%7s%8s%7s%9u%5u%7u", processInfo->pid, processInfo->ppid, processInfo->pgroupID, in ProcessDataShow() 172 for (UINT32 pid = 1; pid < g_processMaxNum; ++pid) { in AllProcessDataShow() 173 const ProcessInfo *processInfo = pcbArray + pid; in AllProcessDataShow() 184 UINT32 pid = OS_KERNEL_IDLE_PROCESS_ID; in ProcessInfoShow() local 185 UINT32 sysUsage = LOS_CPUP_PRECISION - pcbArray[pid].cpup10sUsage; in ProcessInfoShow() 187 pcbArray[pid].cpup10sUsage / CPUP_MULT, pcbArray[pid].cpup10sUsage % CPUP_MULT); in ProcessInfoShow() 316 SHOW(" %4u%5u", taskInfo->tid, taskInfo->pid); in TaskInfoDataShow() [all...] |
/kernel/liteos_a/testsuites/unittest/security/reugid/smoke/ |
H A D | reugid_test_001.cpp | 374 pid_t pid = fork(); in Child() local 375 if (pid == 0) { in Child() 381 ret = waitpid(pid, &status, 0); in Child() 382 ICUNIT_GOTO_EQUAL(ret, pid, ret, EXIT); in Child() 421 pid_t pid = fork(); in TestCase() local 422 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // assume pid is between 0 and 100000 in TestCase() 423 if (pid == 0) { in TestCase() 428 ret = waitpid(pid, in TestCase() [all...] |