mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +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
@@ -66,7 +66,6 @@
|
||||
"munmap","sys/mman.h","defined(CONFIG_FS_RAMMAP)","int","FAR void *","size_t"
|
||||
"nx_mkfifo","nuttx/fs/fs.h","defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0","int","FAR const char *","mode_t","size_t"
|
||||
"nx_pipe","nuttx/fs/fs.h","defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0","int","int [2]|FAR int *","size_t","int"
|
||||
"nx_task_spawn","nuttx/spawn.h","defined(CONFIG_LIB_SYSCALL) && !defined(CONFIG_BUILD_KERNEL)","int","FAR const struct spawn_syscall_parms_s *"
|
||||
"nx_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char *","FAR va_list *"
|
||||
"nxsched_get_stackinfo","nuttx/sched.h","","int","pid_t","FAR struct stackinfo_s *"
|
||||
"nxsched_get_streams","nuttx/sched.h","defined(CONFIG_FILE_STREAM)","FAR struct streamlist *"
|
||||
@@ -171,6 +170,7 @@
|
||||
"task_restart","sched.h","","int","pid_t"
|
||||
"task_setcancelstate","sched.h","","int","int","FAR int *"
|
||||
"task_setcanceltype","sched.h","defined(CONFIG_CANCELLATION_POINTS)","int","int","FAR int *"
|
||||
"task_spawn","nuttx/spawn.h","!defined(CONFIG_BUILD_KERNEL)","int","FAR const char *","main_t","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char * const []|FAR char * const *","FAR char * const []|FAR char * const *"
|
||||
"task_testcancel","pthread.h","defined(CONFIG_CANCELLATION_POINTS)","void"
|
||||
"tcdrain","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int"
|
||||
"telldir","dirent.h","","off_t","FAR DIR *"
|
||||
|
||||
|
Reference in New Issue
Block a user