summaryrefslogtreecommitdiff
path: root/nuttx/sched/task_create.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-23 22:23:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-23 22:23:46 +0000
commit7080c71f2b2007926d5d7728f2ff443968ebe1fc (patch)
treedbc9c30e5aec5ddcdf6f0abd2b9a9416721c9bce /nuttx/sched/task_create.c
parent7866bca6aac68f69426b9433fa5c972b5143dde1 (diff)
downloadpx4-nuttx-7080c71f2b2007926d5d7728f2ff443968ebe1fc.tar.gz
px4-nuttx-7080c71f2b2007926d5d7728f2ff443968ebe1fc.tar.bz2
px4-nuttx-7080c71f2b2007926d5d7728f2ff443968ebe1fc.zip
Add logic to retain child task exit status if so configured
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5553 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/task_create.c')
-rw-r--r--nuttx/sched/task_create.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c
index 801706cbf..2ed929ab0 100644
--- a/nuttx/sched/task_create.c
+++ b/nuttx/sched/task_create.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task_create.c
*
- * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -81,7 +81,7 @@
*
* Input Parameters:
* name - Name of the new task
- * type - Type of the new task
+ * ttype - Type of the new task
* priority - Priority of the new task
* stack_size - size (in bytes) of the stack needed
* entry - Entry point of a new task
@@ -99,10 +99,10 @@
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-static int thread_create(const char *name, uint8_t type, int priority,
+static int thread_create(const char *name, uint8_t ttype, int priority,
int stack_size, main_t entry, const char **argv)
#else
-static int thread_create(const char *name, uint8_t type, int priority,
+static int thread_create(const char *name, uint8_t ttype, int priority,
main_t entry, const char **argv)
#endif
{
@@ -142,15 +142,9 @@ static int thread_create(const char *name, uint8_t type, int priority,
}
#endif
- /* Mark the type of this thread (this setting will be needed in
- * task_schedsetup() when up_initial_state() is called.
- */
-
- tcb->flags |= type;
-
/* Initialize the task control block */
- ret = task_schedsetup(tcb, priority, task_start, entry);
+ ret = task_schedsetup(tcb, priority, task_start, entry, ttype);
if (ret != OK)
{
goto errout_with_tcb;