sched/task: Simplify the syscall handling of task_spawn

It's better to save one argument by returning pid directly.
This change also follow the convention of task_create.
BTW, it is reasonable to adjust the function prototype a
little bit from both implementation and consistency since
task_spawn is NuttX specific API.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-05-12 11:34:50 +08:00
committed by Masayuki Ishikawa
parent 72d2fc547e
commit ae216cf9e9
8 changed files with 34 additions and 178 deletions
+1 -3
View File
@@ -85,9 +85,7 @@ SYSCALL_LOOKUP(sem_wait, 1)
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(task_create, 5)
#ifdef CONFIG_LIB_SYSCALL
SYSCALL_LOOKUP(nx_task_spawn, 1)
#endif
SYSCALL_LOOKUP(task_spawn, 6)
#else
SYSCALL_LOOKUP(pgalloc, 2)
#endif