summaryrefslogtreecommitdiff
path: root/nuttx/sched/group_create.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-11 13:21:33 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-11 13:21:33 +0000
commitc0fe85b4248e9dbd6beb66ef6cd7fb5025c40d1b (patch)
tree18bc9e860b1c571b02e09105903cf0dec01e36a8 /nuttx/sched/group_create.c
parentdffbc36a6adb56b217a399dd3acfebdd0f1dc5cf (diff)
downloadpx4-nuttx-c0fe85b4248e9dbd6beb66ef6cd7fb5025c40d1b.tar.gz
px4-nuttx-c0fe85b4248e9dbd6beb66ef6cd7fb5025c40d1b.tar.bz2
px4-nuttx-c0fe85b4248e9dbd6beb66ef6cd7fb5025c40d1b.zip
Fix a typo that crept into lpc17_allocateheap.c in the recent kernel allocator changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5729 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/group_create.c')
-rw-r--r--nuttx/sched/group_create.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/sched/group_create.c b/nuttx/sched/group_create.c
index f2f6ac179..d18fb82f8 100644
--- a/nuttx/sched/group_create.c
+++ b/nuttx/sched/group_create.c
@@ -189,6 +189,25 @@ int group_allocate(FAR struct task_tcb_s *tcb)
return -ENOMEM;
}
+#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \
+ defined(CONFIG_MM_KERNEL_HEAP)
+
+ /* In a flat, single-heap build. The stream list is allocated with the
+ * group structure. But in a kernel build with a kernel allocator, it
+ * must be separately allocated using a user-space allocator.
+ */
+
+ group->tg_streamlist = (FAR struct streamlist *)
+ kuzalloc(sizeof(struct streamlist));
+
+ if (!group->tg_streamlist)
+ {
+ kfree(group);
+ return -ENOMEM;
+ }
+
+#endif
+
/* Attach the group to the TCB */
tcb->cmn.group = group;