diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-28 15:31:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-28 15:31:58 +0000 |
commit | 8bf2bd9ff858b953091e9c06fd573e02dcfefe5a (patch) | |
tree | 617198360881b74f55be80d10213f03cdf23dbfa /nuttx/sched | |
parent | f6b940c07fd543138ca4b856731fcf774edebeed (diff) | |
download | px4-nuttx-8bf2bd9ff858b953091e9c06fd573e02dcfefe5a.tar.gz px4-nuttx-8bf2bd9ff858b953091e9c06fd573e02dcfefe5a.tar.bz2 px4-nuttx-8bf2bd9ff858b953091e9c06fd573e02dcfefe5a.zip |
Add debug output when memory allocations fail
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5686 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/task_create.c | 1 | ||||
-rw-r--r-- | nuttx/sched/task_vfork.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c index c160cb52c..3db41bf5f 100644 --- a/nuttx/sched/task_create.c +++ b/nuttx/sched/task_create.c @@ -116,6 +116,7 @@ static int thread_create(const char *name, uint8_t ttype, int priority, tcb = (FAR struct task_tcb_s *)kzalloc(sizeof(struct task_tcb_s)); if (!tcb) { + sdbg("ERROR: Failed to allocate TCB\n"); errcode = ENOMEM; goto errout; } diff --git a/nuttx/sched/task_vfork.c b/nuttx/sched/task_vfork.c index 58b4152ed..1f365e916 100644 --- a/nuttx/sched/task_vfork.c +++ b/nuttx/sched/task_vfork.c @@ -122,6 +122,7 @@ FAR struct task_tcb_s *task_vforksetup(start_t retaddr) child = (FAR struct task_tcb_s *)kzalloc(sizeof(struct task_tcb_s)); if (!child) { + sdbg("ERROR: Failed to allocate TCB\n"); set_errno(ENOMEM); return NULL; } |