summaryrefslogtreecommitdiff
path: root/nuttx/sched/pthread_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/pthread_create.c')
-rw-r--r--nuttx/sched/pthread_create.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c
index 57ef7696b..ce19941fc 100644
--- a/nuttx/sched/pthread_create.c
+++ b/nuttx/sched/pthread_create.c
@@ -247,6 +247,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
ptcb = (FAR struct pthread_tcb_s *)kzalloc(sizeof(struct pthread_tcb_s));
if (!ptcb)
{
+ sdbg("ERROR: Failed to allocate TCB\n");
return ENOMEM;
}
@@ -283,6 +284,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
pjoin = (FAR struct join_s*)kzalloc(sizeof(struct join_s));
if (!pjoin)
{
+ sdbg("ERROR: Failed to allocate join\n");
errcode = ENOMEM;
goto errout_with_tcb;
}