2007-04-13 Joel Sherrill <joel@OARcorp.com>

* user/task.t: Add rtems_iterate_over_all_threads.
This commit is contained in:
Joel Sherrill
2007-04-13 22:34:16 +00:00
parent e6466f7955
commit 40e572f85a
2 changed files with 51 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2007-04-13 Joel Sherrill <joel@OARcorp.com>
* user/task.t: Add rtems_iterate_over_all_threads.
2007-03-10 Joel Sherrill <joel@OARcorp.com> 2007-03-10 Joel Sherrill <joel@OARcorp.com>
PR 1226/cpukit PR 1226/cpukit
@@ -41,6 +45,7 @@
* porting/interrupts.t: Fix bogus _CPU_ISR_Get_level. * porting/interrupts.t: Fix bogus _CPU_ISR_Get_level.
2006-09-07 Ken Peters <ken.peters@jpl.nasa.gov>
2006-09-07 Ken Peters <ken.peters@jpl.nasa.gov> 2006-09-07 Ken Peters <ken.peters@jpl.nasa.gov>
PR 1171/doc PR 1171/doc

View File

@@ -31,6 +31,7 @@ by the task manager are:
@item @code{@value{DIRPREFIX}task_set_note} - Set task notepad entry @item @code{@value{DIRPREFIX}task_set_note} - Set task notepad entry
@item @code{@value{DIRPREFIX}task_wake_after} - Wake up after interval @item @code{@value{DIRPREFIX}task_wake_after} - Wake up after interval
@item @code{@value{DIRPREFIX}task_wake_when} - Wake up when specified @item @code{@value{DIRPREFIX}task_wake_when} - Wake up when specified
@item @code{@value{DIRPREFIX}iterate_over_all_threads} - Iterate Over Tasks
@item @code{@value{DIRPREFIX}task_variable_add} - Associate per task variable @item @code{@value{DIRPREFIX}task_variable_add} - Associate per task variable
@item @code{@value{DIRPREFIX}task_variable_get} - Obtain value of a a per task variable @item @code{@value{DIRPREFIX}task_variable_get} - Obtain value of a a per task variable
@item @code{@value{DIRPREFIX}task_variable_delete} - Remove per task variable @item @code{@value{DIRPREFIX}task_variable_delete} - Remove per task variable
@@ -1610,6 +1611,51 @@ A clock tick is required to support the functionality of this directive.
@page @page
@subsection ITERATE_OVER_ALL_THREADS - Iterate Over Tasks
@cindex iterate over all threads
@subheading CALLING SEQUENCE:
@ifset is-C
@findex rtems_iterate_over_all_threads
@example
typedef void (*rtems_per_thread_routine)(
Thread_Control *the_thread
);
void rtems_iterate_over_all_threads(
rtems_per_thread_routine routine
);
@end example
@end ifset
@ifset is-Ada
@example
NOT SUPPORTED FROM Ada
@end example
@end ifset
@subheading DIRECTIVE STATUS CODES: NONE
@subheading DESCRIPTION:
This directive iterates over all of the existant threads in the
system and invokes @code{routine} on each of them. The user should
be careful in accessing the contents of @code{the_thread}.
This routine is intended for use in diagnostic utilities and is
not intented for routine use in an operational system.
@subheading NOTES:
There is NO protection while this routine is called. Thus it is
possible that @code{the_thread} could be deleted while this is operating.
By not having protection, the user is free to invoke support routines
from the C Library which require semaphores for data structures.
@page
@subsection TASK_VARIABLE_ADD - Associate per task variable @subsection TASK_VARIABLE_ADD - Associate per task variable
@cindex per-task variable @cindex per-task variable