[smart] split out part of lwp_new() to lwp_create()

Prev implementation of lwp_new() including the create of lwp object
and the pid allocation. But not every lwp object need a pid.
So this patch split out the business of lwp_new() to improve the
maintainability.

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2023-09-25 16:12:49 +08:00
committed by guo
parent 261f5bee67
commit a300cef2a8
7 changed files with 49 additions and 56 deletions

View File

@@ -1152,7 +1152,7 @@ pid_t lwp_execve(char *filename, int debug, int argc, char **argv, char **envp)
return -EACCES;
}
lwp = lwp_new();
lwp = lwp_create(LWP_CREATE_FLAG_ALLOC_PID);
if (lwp == RT_NULL)
{