diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-31 13:37:59 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-02 08:46:47 +0100 |
commit | d271c3bb78f86dd9417a964b019b8e38911064fa (patch) | |
tree | 3c36b87c580464cc7f1e5aec89e1137a68759da3 /cpukit/score/include | |
parent | posix: Fix timer interval (diff) | |
download | rtems-d271c3bb78f86dd9417a964b019b8e38911064fa.tar.bz2 |
rtems: Add rtems_task_iterate()
Update #2423.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 10 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index a86d81b4e2..d839b1f9ec 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -834,18 +834,12 @@ void *_Thread_Idle_body( ); #endif -/** This defines the type for a method which operates on a single thread. - */ typedef void (*rtems_per_thread_routine)( Thread_Control * ); -/** - * @brief Iterates over all threads. - * This routine iterates over all threads regardless of API and - * invokes the specified routine. - */ +/* Use rtems_task_iterate() instead */ void rtems_iterate_over_all_threads( rtems_per_thread_routine routine -); +) RTEMS_DEPRECATED; /** * @brief Thread control add-on. diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 7b978ea477..51d9d473bf 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -83,6 +83,13 @@ extern Thread_Control *_Thread_Allocated_fp; RTEMS_CONTAINER_OF( node, Thread_Control, Resource_node ) #endif +typedef bool ( *Thread_Visitor )( Thread_Control *the_thread, void *arg ); + +void _Thread_Iterate( + Thread_Visitor visitor, + void *arg +); + void _Thread_Initialize_information( Thread_Information *information, Objects_APIs the_api, |