libs/libc/fork: add lib_fork implementation

1. add lib_fork api in libs/libc, we need a fork() api to implement the
fork relative method, such as pthread_atfork
2. rename the assembly fork entry function name to up_fork(), and rename
the up_fork() to arch specific name, such as
sim_fork()/arm_fork()/mips_fork() etc.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2023-07-16 11:34:17 +08:00
committed by Alin Jerpelea
parent 46b25b3849
commit 3524f4b9ce
23 changed files with 265 additions and 156 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ SYSCALL_LOOKUP(task_setcancelstate, 2)
/* The following can be individually enabled */
#ifdef CONFIG_ARCH_HAVE_FORK
SYSCALL_LOOKUP(fork, 0)
SYSCALL_LOOKUP(up_fork, 0)
#endif
#ifdef CONFIG_SCHED_WAITPID