diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-30 20:13:50 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-30 20:13:50 +0000 |
commit | b121fbbb00aa877caef26e5ffb14b3687d36827f (patch) | |
tree | f770414832eeecb35adb70404b31d147afad7235 /nuttx/sched | |
parent | 6ab6c46f2f29d82707bc7c3aae3ec5283bd285aa (diff) | |
download | px4-firmware-b121fbbb00aa877caef26e5ffb14b3687d36827f.tar.gz px4-firmware-b121fbbb00aa877caef26e5ffb14b3687d36827f.tar.bz2 px4-firmware-b121fbbb00aa877caef26e5ffb14b3687d36827f.zip |
Add configurable application entry point
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5070 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/Kconfig | 8 | ||||
-rw-r--r-- | nuttx/sched/os_bringup.c | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 9d7a38549..37ce0ebd6 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -202,6 +202,14 @@ config SCHED_ONEXIT_MAX is supported. That number can be increased by defined this setting to the number that you require. +config USER_ENTRYPOINT + string "Appliation entry point" + default "user_start" + ---help--- + The name of the entry point for user applications. For the example + applications this is of the form 'app_main' where 'app' is the application + name. If not defined, USER_ENTRYPOINT defaults to "user_start." + config DISABLE_OS_API bool "Disable NuttX interfaces" default y diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c index 646f49158..d6d943137 100644 --- a/nuttx/sched/os_bringup.c +++ b/nuttx/sched/os_bringup.c @@ -71,12 +71,6 @@ * then the default entry point is user_start. */ -#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_USER_ENTRYPOINT) -# define USER_ENTRYPOINT (main_t)CONFIG_USER_ENTRYPOINT -#else -# define USER_ENTRYPOINT user_start -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -175,11 +169,11 @@ int os_bringup(void) init_taskid = exec_namedapp(CONFIG_BUILTIN_APP_START, argv); #else - /* Start the default application at USER_ENTRYPOINT() */ + /* Start the default application at CONFIG_USER_ENTRYPOINT() */ init_taskid = TASK_CREATE("init", SCHED_PRIORITY_DEFAULT, CONFIG_USERMAIN_STACKSIZE, - (main_t)USER_ENTRYPOINT, (const char **)NULL); + (main_t)CONFIG_USER_ENTRYPOINT, (const char **)NULL); #endif ASSERT(init_taskid != ERROR); return OK; |