From c3c4c48d3e86234a7ed6ccd8f7516a3d48f3553f Mon Sep 17 00:00:00 2001
From: Gregory Nutt Last Updated: August 29, 2014 Last Updated: September 10, 2014
NuttX RTOS Porting Guide
- up_addrenv_destroy()
4.4.3 up_addrenv_vtext()
4.4.4 up_addrenv_vdata()
- 4.4.5 up_addrenv_select()
- 4.4.6 up_addrenv_restore()
- 4.4.7 up_addrenv_clone()
- 4.4.8 up_addrenv_attach()
- 4.4.9 up_addrenv_detach()
+ 4.4.5 up_addrenv_heapsize()
+ 4.4.6 up_addrenv_select()
+ 4.4.7 up_addrenv_restore()
+ 4.4.8 up_addrenv_clone()
+ 4.4.9 up_addrenv_attach()
+ 4.4.10 up_addrenv_detach()
4.5 APIs Exported by NuttX to Architecture-Specific Logic
@@ -2927,15 +2928,19 @@ VxWorks provides the following comparable interface:
Returns the virtual base address of the
@@ -2948,12 +2953,12 @@ VxWorks provides the following comparable interface:
.bss/.data address environment.
up_addrenv_select():
+ 4.4.5 up_addrenv_heapsize():
+ Return the initial heap size.
+ up_addrenv_select():
Instantiate an address environment.
up_addrenv_restore():
+ 4.4.7 up_addrenv_restore():
Restore an address environment.
up_addrenv_clone():
+ 4.4.8 up_addrenv_clone():
Copy an address environment from one location to another.
up_addrenv_attach():
+ 4.4.9 up_addrenv_attach():
Clone the group address environment assigned to a new thread.
This operation is done when a pthread is created that share's the same address environment.
up_addrenv_detach():
+ 4.4.10 up_addrenv_detach():
Release the thread's reference to a group address environment when a task/thread exits.
up_addrenv_create()Function Prototype:
int up_addrenv_create(size_t textsize, size_t datasize, FAR group_addrenv_t *addrenv);
+ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, FAR group_addrenv_t *addrenv);
Description:
textsize: The size (in bytes) of the .text address environment needed by the task. This region may be read/execute only.datasize: The size (in bytes) of the .bss/.data address environment needed by the task. This region may be read/write only.heapsize: The initial size (in bytes) of the heap address environment needed by the task. This region may be read/write only.addrenv: The location to return the representation of the task address environment.Returned Value:
@@ -2992,7 +2998,7 @@ VxWorks provides the following comparable interface:Input Parameters:
addrenv: The representation of the task address environment previously returned by up_addrenv_create.addrenv: The representation of the task address environment previously returned by up_addrenv_create().Returned Value:
Input Parameters:
addrenv: The representation of the task address environment previously returned by up_addrenv_create.addrenv: The representation of the task address environment previously returned by up_addrenv_create().vtext: The location to return the virtual address.Returned Value:
@@ -3031,7 +3037,7 @@ VxWorks provides the following comparable interface:Input Parameters:
addrenv: The representation of the task address environment previously returned by up_addrenv_create.addrenv: The representation of the task address environment previously returned by up_addrenv_create().textsize: For some implementations, the text and data will be saved in the same memory region (read/write/execute) and, in this case, the virtual address of the data just lies at this offset into the common region.vdata: The location to return the virtual address.OK) on success; a negated errno value on failure.
-up_addrenv_select()up_addrenv_heapsize()Function Prototype:
+
ssize_t up_addrenv_heapsize(FAR const group_addrenv_t *addrenv);
+Description:
+up_addrenv_create() when the heap memory region was first created.
+ This may or may not differ from the heapsize parameter that was passed to up_addrenv_create().
+Input Parameters:
+addrenv: The representation of the task address environment previously returned by up_addrenv_create().Returned Value:
+errno value on failure.
+up_addrenv_select()Function Prototype:
int up_addrenv_select(group_addrenv_t *addrenv, save_addrenv_t *oldenv);
@@ -3052,7 +3078,7 @@ VxWorks provides the following comparable interface:
Input Parameters:
addrenv: The representation of the task address environment previously returned by up_addrenv_create.addrenv: The representation of the task address environment previously returned by up_addrenv_create().oldenv:
The address environment that was in place before up_addrenv_select() was called.
This may be used with up_addrenv_restore() to restore the original address environment that was in place before up_addrenv_select() was called.
@@ -3064,7 +3090,7 @@ VxWorks provides the following comparable interface:
Zero (OK) on success; a negated errno value on failure.
up_addrenv_restore()up_addrenv_restore()Function Prototype:
int up_addrenv_restore(save_addrenv_t oldenv);
@@ -3083,7 +3109,7 @@ VxWorks provides the following comparable interface:
Zero (OK) on success; a negated errno value on failure.
up_addrenv_clone()up_addrenv_clone()Function Prototype:
int up_addrenv_clone(FAR const task_group_s *src, FAR struct task_group_s *dest);
@@ -3102,7 +3128,7 @@ VxWorks provides the following comparable interface:
Zero (OK) on success; a negated errno value on failure.
up_addrenv_attach()up_addrenv_attach()Function Prototype:
int up_addrenv_attach(FAR struct task_group_s *group, FAR struct tcb_s *tcb);
@@ -3128,7 +3154,7 @@ VxWorks provides the following comparable interface:
Zero (OK) on success; a negated errno value on failure.
up_addrenv_detach()up_addrenv_detach()Function Prototype:
int up_addrenv_detach(FAR struct task_group_s *group, FAR struct task_group_s *tcb);