mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 22:33:37 +08:00
Add logic to retain child task exit status if so configured
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5553 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_create.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -354,15 +354,10 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Mark this task as a pthread (this setting will be needed in
|
||||
* task_schedsetup() when up_initial_state() is called.
|
||||
*/
|
||||
|
||||
ptcb->flags |= TCB_FLAG_TTYPE_PTHREAD;
|
||||
|
||||
/* Initialize the task control block */
|
||||
|
||||
ret = task_schedsetup(ptcb, priority, pthread_start, (main_t)start_routine);
|
||||
ret = task_schedsetup(ptcb, priority, pthread_start, (main_t)start_routine,
|
||||
TCB_FLAG_TTYPE_PTHREAD);
|
||||
if (ret != OK)
|
||||
{
|
||||
sched_releasetcb(ptcb);
|
||||
|
||||
Reference in New Issue
Block a user