summaryrefslogtreecommitdiff
path: root/nuttx/sched/init
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-03 14:58:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-03 14:58:24 -0600
commitc6e48b65d0729bc4fffbf57dac4fb8c97a35fd63 (patch)
tree8704f2481d566dd90cc40d89e8753381d4589521 /nuttx/sched/init
parentffa0635358e2080f6608ec41e172e4ba0873f91a (diff)
downloadnuttx-c6e48b65d0729bc4fffbf57dac4fb8c97a35fd63.tar.gz
nuttx-c6e48b65d0729bc4fffbf57dac4fb8c97a35fd63.tar.bz2
nuttx-c6e48b65d0729bc4fffbf57dac4fb8c97a35fd63.zip
Fix more places where the user-mode allocator is used to allocate kernel thread resources -- before the user-mode allocator even exists
Diffstat (limited to 'nuttx/sched/init')
-rw-r--r--nuttx/sched/init/os_start.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nuttx/sched/init/os_start.c b/nuttx/sched/init/os_start.c
index 8f3a190c2..05278111a 100644
--- a/nuttx/sched/init/os_start.c
+++ b/nuttx/sched/init/os_start.c
@@ -380,9 +380,9 @@ void os_start(void)
#endif
}
+#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)
/* Initialize tasking data structures */
-#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (task_initialize != NULL)
#endif
@@ -427,9 +427,9 @@ void os_start(void)
}
#endif
+#ifndef CONFIG_DISABLE_SIGNALS
/* Initialize the signal facility (if in link) */
-#ifndef CONFIG_DISABLE_SIGNALS
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (sig_initialize != NULL)
#endif
@@ -438,9 +438,9 @@ void os_start(void)
}
#endif
+#ifndef CONFIG_DISABLE_MQUEUE
/* Initialize the named message queue facility (if in link) */
-#ifndef CONFIG_DISABLE_MQUEUE
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (mq_initialize != NULL)
#endif
@@ -449,9 +449,9 @@ void os_start(void)
}
#endif
+#ifndef CONFIG_DISABLE_PTHREAD
/* Initialize the thread-specific data facility (if in link) */
-#ifndef CONFIG_DISABLE_PTHREAD
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (pthread_initialize != NULL)
#endif
@@ -460,9 +460,9 @@ void os_start(void)
}
#endif
+#if CONFIG_NFILE_DESCRIPTORS > 0
/* Initialize the file system (needed to support device drivers) */
-#if CONFIG_NFILE_DESCRIPTORS > 0
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (fs_initialize != NULL)
#endif
@@ -471,9 +471,9 @@ void os_start(void)
}
#endif
+#ifdef CONFIG_NET
/* Initialize the network system */
-#ifdef CONFIG_NET
net_initialize();
#endif
@@ -497,25 +497,25 @@ void os_start(void)
}
/* IDLE Group Initialization **********************************************/
- /* Allocate the IDLE group and suppress child status. */
-
#ifdef HAVE_TASK_GROUP
- DEBUGVERIFY(group_allocate(&g_idletcb));
+ /* Allocate the IDLE group */
+
+ DEBUGVERIFY(group_allocate(&g_idletcb, g_idletcb.cmn.flags));
#endif
+#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
/* Create stdout, stderr, stdin on the IDLE task. These will be
* inherited by all of the threads created by the IDLE task.
*/
-#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
DEBUGVERIFY(group_setupidlefiles(&g_idletcb));
#endif
+#ifdef HAVE_TASK_GROUP
/* Complete initialization of the IDLE group. Suppress retention
* of child status in the IDLE group.
*/
-#ifdef HAVE_TASK_GROUP
DEBUGVERIFY(group_initialize(&g_idletcb));
g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
#endif