From 540de0e56617d4c37435dfa6dfb875f6f192977c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 5 Apr 2007 15:24:32 +0000 Subject: 2007-04-05 Joel Sherrill * user/task.t: Add rtems_iterate_over_all_threads. --- doc/ChangeLog | 4 ++++ doc/user/task.t | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) (limited to 'doc') diff --git a/doc/ChangeLog b/doc/ChangeLog index 82cb83cb7b..38932fcdb9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2007-04-05 Joel Sherrill + + * user/task.t: Add rtems_iterate_over_all_threads. + 2007-04-02 Joel Sherrill * user/clock.t: Add clock_get_uptime(). diff --git a/doc/user/task.t b/doc/user/task.t index 8ad87d0760..1721c91477 100644 --- a/doc/user/task.t +++ b/doc/user/task.t @@ -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_wake_after} - Wake up after interval @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_get} - Obtain value of a a 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 +@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 @cindex per-task variable -- cgit v1.2.3