From f34406ac488b6d5fb2f50f026e1964fb33ae649d Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 4 Feb 2013 21:24:00 +0000 Subject: 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 --- nuttx/sched/task_create.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nuttx/sched/task_create.c') diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c index 976cca35b..30fc1354f 100644 --- a/nuttx/sched/task_create.c +++ b/nuttx/sched/task_create.c @@ -106,14 +106,14 @@ static int thread_create(const char *name, uint8_t ttype, int priority, main_t entry, FAR char * const argv[]) #endif { - FAR struct tcb_s *tcb; + FAR struct task_tcb_s *tcb; pid_t pid; int errcode; int ret; /* Allocate a TCB for the new task. */ - tcb = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s)); + tcb = (FAR struct task_tcb_s *)kzalloc(sizeof(struct task_tcb_s)); if (!tcb) { errcode = ENOMEM; @@ -123,7 +123,7 @@ static int thread_create(const char *name, uint8_t ttype, int priority, /* Allocate a new task group */ #ifdef HAVE_TASK_GROUP - ret = group_allocate(tcb); + ret = group_allocate((FAR struct tcb_s *)tcb); if (ret < 0) { errcode = -ret; @@ -145,7 +145,7 @@ static int thread_create(const char *name, uint8_t ttype, int priority, /* Allocate the stack for the TCB */ #ifndef CONFIG_CUSTOM_STACK - ret = up_create_stack(tcb, stack_size); + ret = up_create_stack((FAR struct tcb_s *)tcb, stack_size); if (ret != OK) { errcode = -ret; @@ -169,7 +169,7 @@ static int thread_create(const char *name, uint8_t ttype, int priority, /* Now we have enough in place that we can join the group */ #ifdef HAVE_TASK_GROUP - ret = group_initialize(tcb); + ret = group_initialize((FAR struct tcb_s *)tcb); if (ret < 0) { errcode = -ret; @@ -179,11 +179,11 @@ static int thread_create(const char *name, uint8_t ttype, int priority, /* Get the assigned pid before we start the task */ - pid = (int)tcb->pid; + pid = (int)tcb->cmn.pid; /* Activate the task */ - ret = task_activate(tcb); + ret = task_activate((FAR struct tcb_s *)tcb); if (ret != OK) { errcode = get_errno(); @@ -197,7 +197,7 @@ static int thread_create(const char *name, uint8_t ttype, int priority, return pid; errout_with_tcb: - sched_releasetcb(tcb); + sched_releasetcb((FAR struct tcb_s *)tcb); errout: set_errno(errcode); -- cgit v1.2.3