mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +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
+1
-1
@@ -68,7 +68,6 @@
|
||||
"nx_pipe","nuttx/fs/fs.h","defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0","int","int [2]|FAR int *","size_t","int"
|
||||
"nx_pthread_create","nuttx/pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_trampoline_t","FAR pthread_t *","FAR const pthread_attr_t *","pthread_startroutine_t","pthread_addr_t","pthread_exitroutine_t"
|
||||
"nx_pthread_exit","nuttx/pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","noreturn","pthread_addr_t"
|
||||
"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 *"
|
||||
@@ -169,6 +168,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