summaryrefslogtreecommitdiff
path: root/nuttx/sched/os_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/os_start.c
parent7071ca9d21d783827f93fcd25631aa2da8df8fe4 (diff)
downloadnuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.gz
nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.bz2
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/os_start.c')
-rw-r--r--nuttx/sched/os_start.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index fd13865db..ace475ba1 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -204,7 +204,7 @@ const tasklist_t g_tasklisttable[NUM_TASK_STATES] =
* that user init task is responsible for bringing up the rest of the system
*/
-static FAR struct tcb_s g_idletcb;
+static FAR struct task_tcb_s g_idletcb;
/* This is the name of the idle task */
@@ -262,7 +262,7 @@ void os_start(void)
/* Assign the process ID of ZERO to the idle task */
- g_pidhash[ PIDHASH(0)].tcb = &g_idletcb;
+ g_pidhash[ PIDHASH(0)].tcb = &g_idletcb.cmn;
g_pidhash[ PIDHASH(0)].pid = 0;
/* Initialize a TCB for this thread of execution. NOTE: The default
@@ -272,13 +272,13 @@ void os_start(void)
* that has pid == 0 and sched_priority == 0.
*/
- bzero((void*)&g_idletcb, sizeof(struct tcb_s));
- g_idletcb.task_state = TSTATE_TASK_RUNNING;
- g_idletcb.entry.main = (main_t)os_start;
+ bzero((void*)&g_idletcb, sizeof(struct task_tcb_s));
+ g_idletcb.cmn.task_state = TSTATE_TASK_RUNNING;
+ g_idletcb.cmn.entry.main = (main_t)os_start;
#if CONFIG_TASK_NAME_SIZE > 0
- strncpy(g_idletcb.name, g_idlename, CONFIG_TASK_NAME_SIZE-1);
- g_idletcb.argv[0] = g_idletcb.name;
+ strncpy(g_idletcb.cmn.name, g_idlename, CONFIG_TASK_NAME_SIZE-1);
+ g_idletcb.argv[0] = g_idletcb.cmn.name;
#else
g_idletcb.argv[0] = (char*)g_idlename;
#endif /* CONFIG_TASK_NAME_SIZE */
@@ -289,7 +289,7 @@ void os_start(void)
/* Initialize the processor-specific portion of the TCB */
- up_initial_state(&g_idletcb);
+ up_initial_state(&g_idletcb.cmn);
/* Initialize the semaphore facility(if in link). This has to be done
* very early because many subsystems depend upon fully functional
@@ -330,7 +330,7 @@ void os_start(void)
/* Allocate the IDLE group and suppress child status. */
#ifdef HAVE_TASK_GROUP
- (void)group_allocate(&g_idletcb);
+ (void)group_allocate(&g_idletcb.cmn);
#endif
/* Initialize the interrupt handling subsystem (if included) */
@@ -456,8 +456,8 @@ void os_start(void)
*/
#ifdef HAVE_TASK_GROUP
- (void)group_initialize(&g_idletcb);
- g_idletcb.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
+ (void)group_initialize(&g_idletcb.cmn);
+ g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
#endif
/* Create initial tasks and bring-up the system */