summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-03 13:47:11 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-03 13:47:11 -0600
commita55e7019368fbea82399cfa6901a87920d295805 (patch)
tree9bb8b508330bf9a4b44c88cad015c231cd7b0f0d /nuttx/sched
parent4c448bf32281a4210bc16087be13cb31ff5acf5e (diff)
downloadpx4-nuttx-a55e7019368fbea82399cfa6901a87920d295805.tar.gz
px4-nuttx-a55e7019368fbea82399cfa6901a87920d295805.tar.bz2
px4-nuttx-a55e7019368fbea82399cfa6901a87920d295805.zip
IDLE TCB setup needs to indicate the the IDLE thread is a privileged, kernel thread
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/init/os_start.c1
-rw-r--r--nuttx/sched/task/task.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/nuttx/sched/init/os_start.c b/nuttx/sched/init/os_start.c
index 27ebd29c2..8f3a190c2 100644
--- a/nuttx/sched/init/os_start.c
+++ b/nuttx/sched/init/os_start.c
@@ -300,6 +300,7 @@ void os_start(void)
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;
+ g_idletcb.cmn.flags = TCB_FLAG_TTYPE_KERNEL;
/* Set the IDLE task name */
diff --git a/nuttx/sched/task/task.h b/nuttx/sched/task/task.h
index a748877f7..b22cf5402 100644
--- a/nuttx/sched/task/task.h
+++ b/nuttx/sched/task/task.h
@@ -63,15 +63,23 @@
* Public Function Prototypes
****************************************************************************/
+/* Task start-up */
+
void task_start(void);
int task_schedsetup(FAR struct task_tcb_s *tcb, int priority,
start_t start, main_t main, uint8_t ttype);
int task_argsetup(FAR struct task_tcb_s *tcb, FAR const char *name,
FAR char * const argv[]);
+
+/* Task exit */
+
int task_exit(void);
int task_terminate(pid_t pid, bool nonblocking);
void task_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking);
void task_recover(FAR struct tcb_s *tcb);
+
+/* Misc. */
+
bool sched_addreadytorun(FAR struct tcb_s *rtrtcb);
#endif /* __SCHED_TASK_TASK_H */