diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-20 18:22:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-03-20 18:22:21 +0000 |
commit | fce497aecaf6826d6fec3cfcb761abeac7fe72bf (patch) | |
tree | 6d2f0d4610067c2b0e4c3f831274037c9ceba91a /nuttx/arch/hc/src/common/up_releasestack.c | |
parent | 3d7ed16eabcbea16723b66df2cd2a7d10ba22474 (diff) | |
download | px4-nuttx-fce497aecaf6826d6fec3cfcb761abeac7fe72bf.tar.gz px4-nuttx-fce497aecaf6826d6fec3cfcb761abeac7fe72bf.tar.bz2 px4-nuttx-fce497aecaf6826d6fec3cfcb761abeac7fe72bf.zip |
Change prototypes of up_create_stack and up_release_stack to include a task type parameter
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5765 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/hc/src/common/up_releasestack.c')
-rw-r--r-- | nuttx/arch/hc/src/common/up_releasestack.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/nuttx/arch/hc/src/common/up_releasestack.c b/nuttx/arch/hc/src/common/up_releasestack.c index f6eaec982..f8c2fa142 100644 --- a/nuttx/arch/hc/src/common/up_releasestack.c +++ b/nuttx/arch/hc/src/common/up_releasestack.c @@ -66,9 +66,31 @@ * A task has been stopped. Free all stack related resources retained in * the defunct TCB. * + * Input Parmeters + * - dtcb: The TCB containing information about the stack to be released + * - ttype: The thread type. This may be one of following (defined in + * include/nuttx/sched.h): + * + * TCB_FLAG_TTYPE_TASK Normal user task + * TCB_FLAG_TTYPE_PTHREAD User pthread + * TCB_FLAG_TTYPE_KERNEL Kernel thread + * + * This thread type is normally available in the flags field of the TCB, + * however, there are certain error recovery contexts where the TCB may + * not be fully initialized when up_release_stack is called. + * + * If CONFIG_NUTTX_KERNEL is defined, then this thread type may affect + * how the stack is freed. For example, kernel thread stacks may have + * been allocated from protected kernel memory. Stacks for user tasks + * and threads must have come from memory that is accessible to user + * code. + * + * Returned Value: + * None + * ****************************************************************************/ -void up_release_stack(struct tcb_s *dtcb) +void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype) { if (dtcb->stack_alloc_ptr) { |