summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereset.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-31 13:37:59 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-02 08:46:47 +0100
commitd271c3bb78f86dd9417a964b019b8e38911064fa (patch)
tree3c36b87c580464cc7f1e5aec89e1137a68759da3 /cpukit/libmisc/cpuuse/cpuusagereset.c
parentposix: Fix timer interval (diff)
downloadrtems-d271c3bb78f86dd9417a964b019b8e38911064fa.tar.bz2
rtems: Add rtems_task_iterate()
Update #2423.
Diffstat (limited to '')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index abfd4db384..608c6a11e8 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -26,8 +26,9 @@
#include "cpuuseimpl.h"
-static void CPU_usage_Per_thread_handler(
- Thread_Control *the_thread
+static bool CPU_usage_Per_thread_handler(
+ Thread_Control *the_thread,
+ void *arg
)
{
const Scheduler_Control *scheduler;
@@ -42,6 +43,7 @@ static void CPU_usage_Per_thread_handler(
_Scheduler_Release_critical( scheduler, &scheduler_lock_context );
_Thread_State_release( the_thread, &state_lock_context );
+ return false;
}
/*
@@ -61,5 +63,5 @@ void rtems_cpu_usage_reset( void )
cpu->cpu_usage_timestamp = CPU_usage_Uptime_at_last_reset;
}
- rtems_iterate_over_all_threads(CPU_usage_Per_thread_handler);
+ rtems_task_iterate(CPU_usage_Per_thread_handler, NULL);
}