mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
Squashed commit of the following:
sched/: Convert legitimate uses of task_create() to nxtask_create(). Review handling of returned values from all uses of kthread_create() (as well as nxtask_create()).
graphics/: Review return values for all calls to kthread_start() because it no longer returns an errno.
drivers/: threads started by drivers should be kernel threads, not user tasks. Review return values for all calls to kthread_start() because it no longer returns an errno.
configs/: threads started by board bringup logic should be kernel threads, not user tasksi (part 2 of 2).
sched/task: Add nxtask_create(). Kthread_create() and nxtask_create() are internal OS functions and should not modify the errno variable. configs/: threads started by board bringup logic should be kernel threads, not user tasks.
This commit is contained in:
@@ -257,16 +257,16 @@ static inline void os_do_appstart(void)
|
||||
|
||||
#ifdef CONFIG_BUILD_PROTECTED
|
||||
DEBUGASSERT(USERSPACE->us_entrypoint != NULL);
|
||||
pid = task_create("init", SCHED_PRIORITY_DEFAULT,
|
||||
CONFIG_USERMAIN_STACKSIZE, USERSPACE->us_entrypoint,
|
||||
(FAR char * const *)NULL);
|
||||
pid = nxtask_create("init", SCHED_PRIORITY_DEFAULT,
|
||||
CONFIG_USERMAIN_STACKSIZE, USERSPACE->us_entrypoint,
|
||||
(FAR char * const *)NULL);
|
||||
#else
|
||||
pid = task_create("init", SCHED_PRIORITY_DEFAULT,
|
||||
CONFIG_USERMAIN_STACKSIZE,
|
||||
(main_t)CONFIG_USER_ENTRYPOINT,
|
||||
(FAR char * const *)NULL);
|
||||
pid = nxtask_create("init", SCHED_PRIORITY_DEFAULT,
|
||||
CONFIG_USERMAIN_STACKSIZE,
|
||||
(main_t)CONFIG_USER_ENTRYPOINT,
|
||||
(FAR char * const *)NULL);
|
||||
#endif
|
||||
ASSERT(pid > 0);
|
||||
DEBUGASSERT(pid > 0);
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_INIT_FILEPATH)
|
||||
@@ -357,7 +357,7 @@ static inline void os_start_application(void)
|
||||
pid = kthread_create("AppBringUp", CONFIG_BOARD_INITTHREAD_PRIORITY,
|
||||
CONFIG_BOARD_INITTHREAD_STACKSIZE,
|
||||
(main_t)os_start_task, (FAR char * const *)NULL);
|
||||
ASSERT(pid > 0);
|
||||
DEBUGASSERT(pid > 0);
|
||||
|
||||
#else
|
||||
/* Do the board/application initialization on this thread of execution. */
|
||||
|
||||
Reference in New Issue
Block a user