From 5be9588ed42d1a4ed297bdc76d9e05e582e78969 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 13 Mar 2013 17:32:37 +0000 Subject: Fixe to kernel build and syscalls. git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5738 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/group_create.c | 4 ++++ nuttx/sched/group_setupidlefiles.c | 4 ++-- nuttx/sched/os_start.c | 11 ++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'nuttx/sched') diff --git a/nuttx/sched/group_create.c b/nuttx/sched/group_create.c index d18fb82f8..875c36d10 100644 --- a/nuttx/sched/group_create.c +++ b/nuttx/sched/group_create.c @@ -225,6 +225,10 @@ int group_allocate(FAR struct task_tcb_s *tcb) ret = env_dup(group); if (ret < 0) { +#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \ + defined(CONFIG_MM_KERNEL_HEAP) + kufree(group->tg_streamlist); +#endif kfree(group); tcb->cmn.group = NULL; return ret; diff --git a/nuttx/sched/group_setupidlefiles.c b/nuttx/sched/group_setupidlefiles.c index 25ed71c04..2589dc637 100644 --- a/nuttx/sched/group_setupidlefiles.c +++ b/nuttx/sched/group_setupidlefiles.c @@ -80,14 +80,14 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb) { -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 FAR struct task_group_s *group = tcb->cmn.group; #endif #if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_DEV_CONSOLE) int fd; #endif -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 DEBUGASSERT(group); #endif diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c index 6894ddc1b..fbb3b7743 100644 --- a/nuttx/sched/os_start.c +++ b/nuttx/sched/os_start.c @@ -39,8 +39,9 @@ #include #include -#include #include +#include +#include #include #include @@ -463,28 +464,28 @@ void os_start(void) /* Allocate the IDLE group and suppress child status. */ #ifdef HAVE_TASK_GROUP - (void)group_allocate(&g_idletcb); + DEBUGVERIFY(group_allocate(&g_idletcb)); #endif /* Create stdout, stderr, stdin on the IDLE task. These will be * inherited by all of the threads created by the IDLE task. */ - (void)group_setupidlefiles(&g_idletcb); + DEBUGVERIFY(group_setupidlefiles(&g_idletcb)); /* Complete initialization of the IDLE group. Suppress retention * of child status in the IDLE group. */ #ifdef HAVE_TASK_GROUP - (void)group_initialize(&g_idletcb); + DEBUGVERIFY(group_initialize(&g_idletcb)); g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT; #endif /* Bring Up the System ****************************************************/ /* Create initial tasks and bring-up the system */ - (void)os_bringup(); + DEBUGVERIFY(os_bringup()); /* The IDLE Loop **********************************************************/ /* When control is return to this point, the system is idle. */ -- cgit v1.2.3