summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-18 18:31:26 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-18 18:31:26 +0000
commit529a1cf7339541eaee3d189a3b97d9c544ba7810 (patch)
tree2ef2e0911d89b06813b81aa21360cf2e20e24ca3 /nuttx/sched
parent5029575d531576c6818094334dcae95359bdd119 (diff)
downloadpx4-nuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.tar.gz
px4-nuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.tar.bz2
px4-nuttx-529a1cf7339541eaee3d189a3b97d9c544ba7810.zip
apps/ update from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3392 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/os_bringup.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index fa9b24915..c9d84c223 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/sched/os_bringup.c
@@ -120,7 +120,10 @@
int os_bringup(void)
{
- int init_taskid;
+#if defined(CONFIG_BUILTIN_APPS) && defined(CONFIG_BUILTIN_APP_START)
+ static const char *argv[3] = {NULL, "init", NULL};
+#endif
+ int init_taskid;
/* Start the page fill worker thread that will resolve page faults.
* This should always be the first thread started because it may
@@ -154,8 +157,14 @@ int os_bringup(void)
svdbg("Starting init thread\n");
#if defined(CONFIG_BUILTIN_APPS) && defined(CONFIG_BUILTIN_APP_START)
- init_taskid = exec_nuttapp(CONFIG_BUILTIN_APP_START, (const char **)NULL);
+ /* Start the built-in application, passing an "init" argument, so that
+ * application can distinguish different run-levels
+ */
+
+ init_taskid = exec_nuttapp(CONFIG_BUILTIN_APP_START, argv);
#else
+ /* Start the default application at user_start() */
+
init_taskid = START_TASK("init", SCHED_PRIORITY_DEFAULT,
CONFIG_USERMAIN_STACKSIZE,
(main_t)user_start, (const char **)NULL);
@@ -165,3 +174,15 @@ int os_bringup(void)
}
+Index: sched/os_bringup.c
+===================================================================
+--- sched/os_bringup.c (revision 3388)
++++ sched/os_bringup.c (working copy)
+@@ -154,7 +154,14 @@
+ svdbg("Starting init thread\n");
+
+ #if defined(CONFIG_BUILTIN_APPS_NUTTX) && defined(CONFIG_BUILTIN_APP_START)
+- init_taskid = exec_nuttapp(CONFIG_BUILTIN_APP_START, (const char **)NULL);
+ #else
+ init_taskid = START_TASK("init", SCHED_PRIORITY_DEFAULT,
+ CONFIG_USERMAIN_STACKSIZE,