From d81b2e88282e3819965f2d67a956a3df7ec0bfcf Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 20 Mar 2013 18:22:21 +0000 Subject: [PATCH] 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 --- Documentation/NuttxPortingGuide.html | 81 ++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 17 deletions(-) diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 3b268c0a56..709c5a3a6d 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: February 4, 2013

+

Last Updated: March 20, 2013

@@ -1613,11 +1613,10 @@ The system can be re-made subsequently by just typing make.

4.1.4 up_create_stack()

-

Prototype: STATUS up_create_stack(FAR struct tcb_s *tcb, size_t stack_size);

+

Prototype: STATUS up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype);

Description. - Allocate a stack for a new thread and setup - up stack-related information in the TCB. + Allocate a stack for a new thread and setup up stack-related information in the TCB.

The following TCB fields must be initialized: @@ -1631,18 +1630,37 @@ The system can be re-made subsequently by just typing make. initial value of the stack pointer.

- This API is NOT required if CONFIG_CUSTOM_STACK - is defined. + This API is NOT required if CONFIG_CUSTOM_STACK is defined.

Input Parameters:

@@ -1652,8 +1670,8 @@ The system can be re-made subsequently by just typing make.

Description. - Setup up stack-related information in the TCB - using pre-allocated stack memory. + Setup up stack-related information in the TCB using pre-allocated stack memory. + This function is called only from task_init() when a task or kernel thread is started (never for pthreads).

The following TCB fields must be initialized: @@ -1667,8 +1685,7 @@ The system can be re-made subsequently by just typing make. initial value of the stack pointer.

- This API is NOT required if CONFIG_CUSTOM_STACK - is defined. + This API is NOT required if CONFIG_CUSTOM_STACK is defined.

Input Parameters:

@@ -1680,18 +1697,48 @@ The system can be re-made subsequently by just typing make. stack_size: The allocated stack size. +

+ NOTE: Unlike up_stack_create() and up_stack_release, this function does not require the task type (ttype) parameter. + The TCB flags will always be set to provide the task type to up_use_stack() if the information needs that information. +

4.1.6 up_release_stack()

Prototype: void up_release_stack(FAR struct tcb_s *dtcb);

Description. - A task has been stopped. Free all stack - related resources retained int the defunct TCB. + A task has been stopped. + Free all stack related resources retained int the defunct TCB.

- This API is NOT required if CONFIG_CUSTOM_STACK - is defined. + This API is NOT required if CONFIG_CUSTOM_STACK is defined.

+

Input Parameters:

+

4.1.7 up_unblock_task()

Prototype: void up_unblock_task(FAR struct tcb_s *tcb);