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:
Gregory Nutt
2018-01-31 16:11:54 -06:00
parent 1550ef2f54
commit 50ca32e254
42 changed files with 293 additions and 164 deletions
+9 -9
View File
@@ -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. */