[app] tweak app start to only run apps with entry points defined
Also remove a few empty extraneous app structs that are not doing anything currently.
This commit is contained in:
@@ -45,6 +45,11 @@ static int app_thread_entry(void *arg) {
|
||||
}
|
||||
|
||||
static void start_app(const struct app_descriptor *app, bool detach) {
|
||||
/* dont start an app that has no entry point */
|
||||
if (app->entry == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t stack_size = (app->flags & APP_FLAG_CUSTOM_STACK_SIZE) ? app->stack_size : DEFAULT_STACK_SIZE;
|
||||
|
||||
printf("starting app %s\n", app->name);
|
||||
|
||||
@@ -324,7 +324,3 @@ out:
|
||||
STATIC_COMMAND_START
|
||||
STATIC_COMMAND("string", "memcpy tests", &string_tests)
|
||||
STATIC_COMMAND_END(stringtests);
|
||||
|
||||
APP_START(stringtests)
|
||||
APP_END
|
||||
|
||||
|
||||
@@ -23,12 +23,3 @@ STATIC_COMMAND("fibo", "threaded fibonacci", &fibo)
|
||||
STATIC_COMMAND("spinner", "create a spinning thread", &spinner)
|
||||
STATIC_COMMAND("cbuf_tests", "test lib/cbuf", &cbuf_tests)
|
||||
STATIC_COMMAND_END(tests);
|
||||
|
||||
static void tests_init(const struct app_descriptor *app) {
|
||||
}
|
||||
|
||||
APP_START(tests)
|
||||
.init = tests_init,
|
||||
.flags = 0,
|
||||
APP_END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user