diff --git a/Documentation/NuttXBinfmt.html b/Documentation/NuttXBinfmt.html index 2f4f6e4252c..0df3b6475eb 100644 --- a/Documentation/NuttXBinfmt.html +++ b/Documentation/NuttXBinfmt.html @@ -8,7 +8,7 @@
Last Updated: January 16, 2013
+Last Updated: August 22, 2014
Last Updated: August 21, 2014
+Last Updated: August 22, 2014
@@ -107,13 +107,13 @@ 4.4 Address Environmentsup_addrenv_create()
- 4.4.2 up_addrenv_vaddr()
- 4.4.3 up_addrenv_select()
- 4.4.4 up_addrenv_restore()
- 4.4.5 up_addrenv_destroy()
+ 4.4.2 up_addrenv_destroy()
+ 4.4.3 up_addrenv_vaddr()
+ 4.4.4 up_addrenv_select()
+ 4.4.5 up_addrenv_restore()
4.4.6 up_addrenv_assign()
- 4.4.7 up_addrenv_share()
- 4.4.8 up_addrenv_release()
+ 4.4.7 up_addrenv_attach()
+ 4.4.8 up_addrenv_detach()
up_alarm_start()up_alarm_start()Function Prototype:
#include <nuttx/arch.h>
@@ -2930,8 +2930,7 @@ VxWorks provides the following comparable interface:
Binary Loader Support.
These are low-level interfaces used in binfmt/ to instantiate tasks with address environments.
- These interfaces all operate on type task_addrenv_t which is an abstract representation of a asks's address environment and must be defined in arch/arch.h if CONFIG_ADDRENV is defined.
- These low-level interfaces include:
+ These interfaces all operate on type group_addrenv_t which is an abstract representation of a task group's address environment and the type must be defined inarch/arch.h if CONFIG_ADDRENV is defined. These low-level interfaces include:
up_addrenv_vaddr():
- Returns the virtual base address of the address environment.
- up_addrenv_select():
- Instantiate an address environment.
- up_addrenv_restore():
- Restore an address environment.
- up_addrenv_destroy():
+ 4.4.2 up_addrenv_destroy():
Destroy an address environment.
up_addrenv_vaddr():
+ Returns the virtual base address of the address environment.
+ up_addrenv_select():
+ Instantiate an address environment.
+ up_addrenv_restore():
+ Restore an address environment.
+ up_addrenv_assign():
- Assign an address environment to a TCB.
+ Assign an address environment to a thread.
Tasking Support.
Other interfaces must be provided to support higher-level interfaces used by the NuttX tasking logic.
- These interfaces are* used by the functions in sched/ and all operate on the TCB which as been assigned an address environment by up_addrenv_assign().
+ These interfaces are* used by the functions in sched/ and all operate on the task group which as been assigned an address environment by up_addrenv_assign().
up_addrenv_share():
- Clone the address environment assigned to one TCB to another.
+ 4.4.7 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_release():
- Release the TCB's reference to an address environment when a task/thread exits.
+ 4.4.8 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 envsize, FAR task_addrenv_t *addrenv);
+ int up_addrenv_create(size_t envsize, FAR group_addrenv_t *addrenv);
Description:
up_addrenv_create() is essentially the allocator of the physical memory for the new task.
Input Parameters:
@@ -3001,10 +2999,28 @@ VxWorks provides the following comparable interface: Zero (OK) on success; a negated errno value on failure.
-up_addrenv_vaddr()up_addrenv_destroy()Function Prototype:
int up_addrenv_vaddr(FAR task_addrenv_t addrenv, FAR void **vaddr);
+ int up_addrenv_destroy(group_addrenv_t addrenv);
+Description:
+up_addrenv_create().
+Input Parameters:
+addrenv: The representation of the task address environment previously returned by up_addrenv_create.Returned Value:
+OK) on success; a negated errno value on failure.
+up_addrenv_vaddr()Function Prototype:
+
int up_addrenv_vaddr(FAR group_addrenv_t addrenv, FAR void **vaddr);
Description:
OK) on success; a negated errno value on failure.
up_addrenv_select()up_addrenv_select()Function Prototype:
int up_addrenv_select(task_addrenv_t addrenv, hw_addrenv_t *oldenv);
+ int up_addrenv_select(group_addrenv_t addrenv, hw_addrenv_t *oldenv);
Description:
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.
- Note that this may be a task agnostic, hardware representation that is different from task_addrenv_t.
+ Note that this may be a task agnostic, hardware representation that is different from group_addrenv_t.
Returned Value:
@@ -3045,7 +3061,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(hw_addrenv_t oldenv);
@@ -3064,76 +3080,63 @@ VxWorks provides the following comparable interface:
Zero (OK) on success; a negated errno value on failure.
up_addrenv_destroy()Function Prototype:
-
int up_addrenv_destroy(task_addrenv_t addrenv);
-Description:
-up_addrenv_create().
-Input Parameters:
-addrenv: The representation of the task address environment previously returned by up_addrenv_create.Returned Value:
-OK) on success; a negated errno value on failure.
-up_addrenv_assign()Function Prototype:
int up_addrenv_assign(task_addrenv_t addrenv, FAR struct tcb_s *tcb);
+ int up_addrenv_assign(group_addrenv_t addrenv, FAR struct task_group_s *group);
Description:
Input Parameters:
addrenv: The representation of the task address environment previously returned by up_addrenv_create.tcb: The TCB of the task to receive the address environment.addrenv: The representation of the group address environment previously returned by up_addrenv_create.group: The new task group to receive the address environment.Returned Value:
OK) on success; a negated errno value on failure.
up_addrenv_share()up_addrenv_attach()Function Prototype:
int up_addrenv_share(FAR const struct tcb_s *ptcb, FAR struct tcb_s *ctcb);
+ int up_addrenv_attach(FAR struct task_group_s *group, FAR struct tcb_s *tcb);
Description:
+ This function is called from the core scheduler logic when a thread is created that needs to share the address environment of its task group. + In this case, the group's address environment may need to be "cloned" for the child thread. +
++ NOTE: In most platforms, nothing will need to be done in this case. + Simply being a member of the group that has the address environment may be sufficient. +
Input Parameters:
ptcb: The TCB of the parent task that has the address environment.ctcb: The TCB of the child thread needing the address environment.group: The task group to which the new thread belongs.ctcb: The TCB of the thread needing the address environment.Returned Value:
OK) on success; a negated errno value on failure.
up_addrenv_release()up_addrenv_detach()Function Prototype:
int up_addrenv_release(FAR struct tcb_s *tcb);
+ int up_addrenv_detach(FAR struct task_group_s *group, FAR struct task_group_s *tcb);
Description:
Input Parameters:
group: The group to which the thread belonged.tcb: The TCB of the task or thread whose the address environment will be released.Returned Value: