将common文件夹下的c文件移动到lib文件夹下

This commit is contained in:
fslongjin
2022-09-28 21:45:38 +08:00
parent be9ac3d58b
commit 1872d9bd4a
18 changed files with 34 additions and 50 deletions

21
kernel/lib/unistd.c Normal file
View File

@ -0,0 +1,21 @@
#include <common/unistd.h>
/**
* @brief fork当前进程
*
* @return pid_t
*/
pid_t fork(void)
{
return (pid_t)enter_syscall_int(SYS_FORK, 0, 0, 0, 0, 0, 0, 0, 0);
}
/**
* @brief vfork当前进程
*
* @return pid_t
*/
pid_t vfork(void)
{
return (pid_t)enter_syscall_int(SYS_VFORK, 0, 0, 0, 0, 0, 0, 0, 0);
}