From 758d4800642060f50cdf26f7063c9825ea635d15 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 3 Apr 2011 20:41:49 +0000 Subject: Move memory manager into user space git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3460 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/task_create.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nuttx/sched/task_create.c') diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c index d70f337c0..3965e61ef 100644 --- a/nuttx/sched/task_create.c +++ b/nuttx/sched/task_create.c @@ -38,11 +38,15 @@ ****************************************************************************/ #include + #include #include #include #include + #include +#include + #include "os_internal.h" #include "env_internal.h" @@ -121,10 +125,10 @@ int task_create(const char *name, int priority, /* Allocate a TCB for the new task. */ - tcb = (FAR _TCB*)kzmalloc(sizeof(_TCB)); + tcb = (FAR _TCB*)kzalloc(sizeof(_TCB)); if (!tcb) { - *get_errno_ptr() = ENOMEM; + errno = ENOMEM; return ERROR; } -- cgit v1.2.3