mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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:
committed by
Masayuki Ishikawa
parent
72d2fc547e
commit
ae216cf9e9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user