diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-07 01:54:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-07 01:54:59 +0000 |
commit | 0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa (patch) | |
tree | 655d2b930b49f60fb64154d8be99e45612987f15 /nuttx/sched | |
parent | 20ff4c56d20fe8c22d6ac44c02efd1252b32ade6 (diff) | |
download | px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.gz px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.tar.bz2 px4-nuttx-0a143e4c2dfae5e5b9e1000fd83ce5d05a84d6aa.zip |
Fix AVR build, Add hooks for kernel threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3477 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/exit.c | 2 | ||||
-rw-r--r-- | nuttx/sched/pthread_create.c | 2 | ||||
-rw-r--r-- | nuttx/sched/sched_releasetcb.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c index 93e24a29d..6793eae77 100644 --- a/nuttx/sched/exit.c +++ b/nuttx/sched/exit.c @@ -91,7 +91,9 @@ void exit(int status) { +#if CONFIG_NFILE_STREAMS > 0 || defined(CONFIG_SCHED_WAITPID) || defined(CONFIG_SCHED_ATEXIT) _TCB *tcb = (_TCB*)g_readytorun.head; +#endif /* Only the lower 8 bits of the exit status are used */ diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c index d1f838a9e..e247ce372 100644 --- a/nuttx/sched/pthread_create.c +++ b/nuttx/sched/pthread_create.c @@ -354,7 +354,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, /* Mark this task as a pthread */ - ptcb->flags |= TCB_FLAG_PTHREAD; + ptcb->flags |= TCB_FLAG_TTYPE_PTHREAD; /* Configure the TCB for a pthread receiving on parameter * passed by value diff --git a/nuttx/sched/sched_releasetcb.c b/nuttx/sched/sched_releasetcb.c index 2be77b77b..5fd509006 100644 --- a/nuttx/sched/sched_releasetcb.c +++ b/nuttx/sched/sched_releasetcb.c @@ -151,11 +151,11 @@ int sched_releasetcb(FAR _TCB *tcb) } #endif - /* Release command line arguments that were allocated - * for task start/re-start. + /* Release command line arguments that were allocated for task + * start/re-start. */ - if ((tcb->flags & TCB_FLAG_PTHREAD) == 0) + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_TASK) { for (i = 1; i < CONFIG_MAX_TASK_ARGS+1 && tcb->argv[i]; i++) { |