mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 20:36:31 +00:00
将common文件夹下的c文件移动到lib文件夹下
This commit is contained in:
15
kernel/lib/sys/wait.c
Normal file
15
kernel/lib/sys/wait.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <syscall/syscall_num.h>
|
||||
#include <syscall/syscall.h>
|
||||
|
||||
/**
|
||||
* @brief 等待指定pid的子进程退出
|
||||
*
|
||||
* @param pid 子进程的pid
|
||||
* @param stat_loc 返回的子进程结束状态
|
||||
* @param options 额外的控制选项
|
||||
* @return pid_t
|
||||
*/
|
||||
pid_t waitpid(pid_t pid, int *stat_loc, int options)
|
||||
{
|
||||
return (pid_t)enter_syscall_int(SYS_WAIT4, (uint64_t)pid, (uint64_t)stat_loc, options, 0, 0, 0, 0, 0);
|
||||
}
|
Reference in New Issue
Block a user