mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +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> Change-Id: Id74f4dd1ef26dfd8f7c473684cf1a45fbeee13cf
This commit is contained in:
+1
-1
@@ -147,7 +147,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
|
||||
* 'name'.
|
||||
*/
|
||||
|
||||
int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry,
|
||||
int task_spawn(FAR const char *name, main_t entry,
|
||||
FAR const posix_spawn_file_actions_t *file_actions,
|
||||
FAR const posix_spawnattr_t *attr,
|
||||
FAR char * const argv[], FAR char * const envp[]);
|
||||
|
||||
Reference in New Issue
Block a user