summaryrefslogtreecommitdiff
path: root/nuttx/sched/task_start.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-04 21:24:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-04 21:24:00 +0000
commitf34406ac488b6d5fb2f50f026e1964fb33ae649d (patch)
tree7d51b44539ecbfa57e4550023a92357dda1b70e3 /nuttx/sched/task_start.c
parent7071ca9d21d783827f93fcd25631aa2da8df8fe4 (diff)
downloadpx4-nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.gz
px4-nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.bz2
px4-nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.zip
Divide struct tcb_s into structs task_tcb_s and pthread_tcb_s
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5611 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/task_start.c')
-rw-r--r--nuttx/sched/task_start.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/sched/task_start.c b/nuttx/sched/task_start.c
index 5a66089c6..8e012b515 100644
--- a/nuttx/sched/task_start.c
+++ b/nuttx/sched/task_start.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task_start.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
@@ -91,9 +91,11 @@
void task_start(void)
{
- FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
+ FAR struct task_tcb_s *tcb = (FAR struct task_tcb_s*)g_readytorun.head;
int argc;
+ DEBUGASSERT((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD);
+
/* Execute the start hook if one has been registered */
#ifdef CONFIG_SCHED_STARTHOOK
@@ -119,5 +121,5 @@ void task_start(void)
* the task returns.
*/
- exit(tcb->entry.main(argc, tcb->argv));
+ exit(tcb->cmn.entry.main(argc, tcb->argv));
}