diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index 709c5a3a6d9..2fa0b2a71f8 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -78,22 +78,23 @@
4.1.3 up_initial_state()
4.1.4 up_create_stack()
4.1.5 up_use_stack()
- 4.1.6 up_release_stack()
- 4.1.7 up_unblock_task()
- 4.1.8 up_block_task()
- 4.1.9 up_release_pending()
- 4.1.10 up_reprioritize_rtr()
- 4.1.11 _exit()
- 4.1.12 up_assert()
- 4.1.13 up_schedule_sigaction()
- 4.1.14 up_allocate_heap()
- 4.1.15 up_interrupt_context()
- 4.1.16 up_disable_irq()
- 4.1.17 up_enable_irq()
- 4.1.18 up_prioritize_irq()
- 4.1.19 up_putc()
- 4.1.20 System Time and Clock
- 4.1.21 Address Environments
+ 4.1.6 up_stack_frame()
+ 4.1.7 up_release_stack()
+ 4.1.8 up_unblock_task()
+ 4.1.9 up_block_task()
+ 4.1.10 up_release_pending()
+ 4.1.11 up_reprioritize_rtr()
+ 4.1.12 _exit()
+ 4.1.13 up_assert()
+ 4.1.14 up_schedule_sigaction()
+ 4.1.15 up_allocate_heap()
+ 4.1.16 up_interrupt_context()
+ 4.1.17 up_disable_irq()
+ 4.1.18 up_enable_irq()
+ 4.1.19 up_prioritize_irq()
+ 4.1.20 up_putc()
+ 4.1.21 System Time and Clock
+ 4.1.22 Address Environments
4.2 APIs Exported by NuttX to Architecture-Specific Logic
make.
The TCB flags will always be set to provide the task type to up_use_stack() if the information needs that information.
-up_release_stack()up_stack_frame()Prototype: FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size);
+ Description.
+ Allocate a stack frame in the TCB's stack to hold thread-specific data.
+ This function may be called anytime after up_create_stack() or up_use_stack() have been called but before the task has been started.
+
+ Thread data may be kept in the stack (instead of in the TCB) if it is accessed by the user code directory.
+ This includes such things as argv[].
+ The stack memory is guaranteed to be in the same protection domain as the thread.
+
+ The following TCB fields will be re-initialized: +
+adj_stack_size: Stack size after removal of the stack frame from the stack.
+ adj_stack_ptr: Adjusted initial stack pointer after the frame has been removed from the stack.
+ This will still be the initial value of the stack pointer when the task is started.
+
+ This API is NOT required if CONFIG_NUTTX_KERNEL is undefined or if CONFIG_CUSTOM_STACK is defined.
+
Input Parameters:
+
+ tcb:
+ The TCB of new task.
+
+ frame_size:
+ The size of the stack frame to allocate.
+
+ Returned Value: + A pointer to bottom of the allocated stack frame. + NULL will be returned on any failures. + The alignment of the returned value is the same as the alignment of the stack itself +
+ +up_release_stack()Prototype: void up_release_stack(FAR struct tcb_s *dtcb);
Description.
@@ -1718,6 +1770,7 @@ The system can be re-made subsequently by just typing make.
dtcb:
The TCB containing information about the stack to be released.
+
@@ -1740,7 +1793,7 @@ The system can be re-made subsequently by just typing make.
up_unblock_task()up_unblock_task()Prototype: void up_unblock_task(FAR struct tcb_s *tcb);
Description.
@@ -1763,7 +1816,7 @@ The system can be re-made subsequently by just typing make.
-
up_block_task()up_block_task()Prototype: void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state);
Description.
@@ -1789,7 +1842,7 @@ The system can be re-made subsequently by just typing make.
-
up_release_pending()up_release_pending()Prototype: void up_release_pending(void);
Description.
@@ -1806,7 +1859,7 @@ The system can be re-made subsequently by just typing make.
function is called.
up_reprioritize_rtr()up_reprioritize_rtr()Prototype: void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority);
Description.
@@ -1841,7 +1894,7 @@ The system can be re-made subsequently by just typing make.
-
_exit()_exit()Prototype: void _exit(int status) noreturn_function;
Description.
@@ -1855,7 +1908,7 @@ The system can be re-made subsequently by just typing make.
before performing scheduling operations.
up_assert()up_assert()Prototype:
void up_assert(FAR const uint8_t *filename, int linenum);
void up_assert_code(FAR const uint8_t *filename, int linenum, int error_code);
@@ -1866,7 +1919,7 @@ The system can be re-made subsequently by just typing make.
way.
up_schedule_sigaction()up_schedule_sigaction()Prototype:
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver);
make.
is defined.
-up_allocate_heap()up_allocate_heap()Prototype: void up_allocate_heap(FAR void **heap_start, size_t *heap_size);
Description.
@@ -1924,14 +1977,14 @@ The system can be re-made subsequently by just typing make.
If a protected kernel-space heap is provided, the kernel heap must be allocated (and protected) by an analogous up_allocate_kheap().
up_interrupt_context()up_interrupt_context()Prototype: bool up_interrupt_context(void)
Description. Return true if we are currently executing in the interrupt handler context.
-up_disable_irq()up_disable_irq()Prototype:
#ifndef CONFIG_ARCH_NOINTC @@ -1958,7 +2011,7 @@ The system can be re-made subsequently by just typingmake. avoided in common implementations where possible. -4.1.17
+up_enable_irq()4.1.18
up_enable_irq()Prototype:
#ifndef CONFIG_ARCH_NOINTC @@ -1979,7 +2032,7 @@ The system can be re-made subsequently by just typingmake. avoided in common implementations where possible. -4.1.18
+up_prioritize_irq()4.1.19
up_prioritize_irq()Prototype:
#ifdef CONFIG_ARCH_IRQPRIO @@ -1996,7 +2049,7 @@ The system can be re-made subsequently by just typingmake. avoided in common implementations where possible. -4.1.19
+up_putc()4.1.20
up_putc()Prototype:
int up_putc(int ch);Description. @@ -2004,9 +2057,9 @@ The system can be re-made subsequently by just typing
-make. Output one character on the console4.1.20 System Time and Clock
+4.1.21 System Time and Clock
-4.1.20.1 Basic System Timer
+4.1.21.1 Basic System Timer
System Timer In most implementations, system time is provided by a timer interrupt. @@ -2089,7 +2142,7 @@ else In this way, the timer interval is controlled from interrupt-to-interrupt to produce an average frequency of exactly 100Hz.
-4.1.20.1 Hardware
+4.1.21.2 Hardware
To enable hardware module use the following configuration options:
@@ -2144,7 +2197,7 @@ else -
4.1.20.2 System Tick and Time
+4.1.21.3 System Tick and Time
The system tick is represented by::
@@ -2167,7 +2220,7 @@ else To retrieve that variable use: -4.1.21 Address Environments
+4.1.22 Address Environments
CPUs that support memory management units (MMUs) may provide address environments within which tasks and their child threads execute. @@ -2191,27 +2244,27 @@ else
up_addrenv_create():
+ 4.1.22.1 up_addrenv_create():
Create an address environment.
up_addrenv_vaddr():
+ 4.1.22.2 up_addrenv_vaddr():
Returns the virtual base address of the address environment.
up_addrenv_select():
+ 4.1.22.3 up_addrenv_select():
Instantiate an address environment.
up_addrenv_restore():
+ 4.1.22.4 up_addrenv_restore():
Restore an address environment.
up_addrenv_destroy():
+ 4.1.22.5 up_addrenv_destroy():
Destroy an address environment.
up_addrenv_assign():
+ 4.1.22.6 up_addrenv_assign():
Assign an address environment to a TCB.
up_addrenv_share():
+ 4.1.22.7 up_addrenv_share():
Clone the address environment assigned to one TCB to another.
This operation is done when a pthread is created that share's the same address environment.
up_addrenv_release():
+ 4.1.22.8 up_addrenv_release():
Release the TCB's reference to an address environment when a task/thread exits.
up_addrenv_create()up_addrenv_create()Prototype:
int up_addrenv_create(size_t envsize, FAR task_addrenv_t *addrenv);
@@ -2257,7 +2310,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_vaddr()up_addrenv_vaddr()Prototype:
int up_addrenv_vaddr(FAR task_addrenv_t addrenv, FAR void **vaddr);
@@ -2277,7 +2330,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_select()up_addrenv_select()Prototype:
int up_addrenv_select(task_addrenv_t addrenv, hw_addrenv_t *oldenv);
@@ -2301,7 +2354,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_restore()up_addrenv_restore()Prototype:
int up_addrenv_restore(hw_addrenv_t oldenv);
@@ -2320,7 +2373,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_destroy()up_addrenv_destroy()Prototype:
int up_addrenv_destroy(task_addrenv_t addrenv);
@@ -2338,7 +2391,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_assign()up_addrenv_assign()Prototype:
int up_addrenv_assign(task_addrenv_t addrenv, FAR struct tcb_s *tcb);
@@ -2357,7 +2410,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_share()up_addrenv_share()Prototype:
int up_addrenv_share(FAR const struct tcb_s *ptcb, FAR struct tcb_s *ctcb);
@@ -2377,7 +2430,7 @@ else
Zero (OK) on success; a negated errno value on failure.
up_addrenv_release()up_addrenv_release()Prototype:
int up_addrenv_release(FAR struct tcb_s *tcb);