summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereset.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-03-16cpuuse: Add implementation Doxygen groupSebastian Huber1-1/+1
2023-01-24cpuuse: Use standard wording and group nameSebastian Huber1-2/+3
Use standard wording in CPU usage reporting files.
2022-03-22cpukit/libmisc/cpuuse: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2021-12-02rtems: Move scheduler directives to own headerSebastian Huber1-0/+1
Move all rtems_scheduler_* directives to the new header file <rtems/rtems/scheduler.h>. Add a Scheduler Manager API and implementation group.
2021-10-25rtems: Fix rate monotonic statisticsSebastian Huber1-1/+2
The rate monotonic period statistics were affected by rtems_cpu_usage_reset(). The logic to detect and work around a CPU usage reset was broken. The Thread_Contol::cpu_time_used is changed to contain the processor time used throughout the entire lifetime of the thread. The new member Thread_Contol::cpu_time_used_at_last_reset is added to contain the processor time used at the time of the last reset through rtems_cpu_usage_reset(). This decouples the resets of the CPU usage and the rate monotonic period statistics. Update #4528.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber1-1/+2
This order change fixes the Latex documentation build via Doxygen.
2019-04-09rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber1-1/+1
Add rtems_scheduler_get_processor_maximum() as a replacement for rtems_get_processor_count(). The rtems_get_processor_count() is a bit orphaned. Adopt it by the Scheduler Manager. The count is also misleading, since the processor set may have gaps and the actual count of online processors may be less than the value returned by rtems_get_processor_count(). Update #3732.
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-1/+1
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-11-02rtems: Add rtems_task_iterate()Sebastian Huber1-3/+5
Update #2423.
2016-05-31cpuuse: Hide implementation detailsSebastian Huber1-0/+2
2016-05-12score: Use thread state lock for current stateSebastian Huber1-3/+10
In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.
2016-03-17score: Fix CPU time used by executing threadsSebastian Huber1-1/+6
The CPU time used of a thread was previously maintained per-processor mostly during _Thread_Dispatch(). However, on SMP configurations the actual processor of a thread is difficult to figure out since thread dispatching is a highly asynchronous process (e.g. via inter-processor interrupts). Only the intended processor of a thread is known to the scheduler easily. Do the CPU usage accounting during thread heir updates in the context of the scheduler operations. Provide the function _Thread_Get_CPU_time_used() to get the CPU usage of a thread using proper locks to get a consistent value. Close #2627.
2015-06-26score: Simplify <rtems/system.h>Sebastian Huber1-1/+1
Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
2015-06-15Remove use ticks for statistics configure option.Joel Sherrill1-17/+9
This was obsolete and broken based upon recent time keeping changes. Thie build option was previously enabled by adding USE_TICKS_FOR_STATISTICS=1 to the configure command line. This propagated into the code as preprocessor conditionals using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
2014-04-22score: Use common names for per-CPU variablesSebastian Huber1-6/+6
Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
2014-04-11rtems: Rename rtems_smp_get_processor_count()Sebastian Huber1-1/+1
Rename rtems_smp_get_processor_count() in rtems_get_processor_count(). Make rtems_get_processor_count() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2013-08-01score: Rename tod.h to todimpl.hSebastian Huber1-1/+1
2013-07-30smp: Add and use _Per_CPU_Get()Sebastian Huber1-1/+1
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index(). Add _Per_CPU_Send_interrupt(). This avoids direct access of _Per_CPU_Information.
2013-07-26score: Merge tod implementation into one fileSebastian Huber1-4/+2
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
2013-07-22score: Create watchdog implementation headerSebastian Huber1-0/+1
Move implementation specific parts of watchdog.h and watchdog.inl into new header file watchdogimpl.h. The watchdog.h contains now only the application visible API.
2013-07-22cpuuse: Add SMP supportSebastian Huber1-1/+10
2012-12-21libmisc: Doxygen Enhancement Task #1Mathew Kallada1-2/+7
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-2/+0
Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
2011-09-152011-09-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-12/+0
* cpukit/libmisc/cpuuse/cpuuse.h, cpukit/libmisc/cpuuse/cpuusagedata.c, cpukit/libmisc/cpuuse/cpuusagereport.c, cpukit/libmisc/cpuuse/cpuusagereset.c: Fixed timestamp usage.
2009-12-022009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey1-1/+1
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemonreportstatistics.c, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Updated copyright line.
2009-12-022009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey1-4/+3
* configure.ac, libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Changed the configuration of statistics granularity to use just one define.
2008-12-082008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-3/+3
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, posix/src/clockgettime.c, posix/src/pthread.c, posix/src/timersettime.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/clockgetsecondssinceepoch.c, rtems/src/clockgetuptime.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, rtems/src/taskwakewhen.c, rtems/src/timerfirewhen.c, rtems/src/timerserver.c, rtems/src/timerserverfirewhen.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/thread.h, score/include/rtems/score/tod.h, score/src/coretod.c, score/src/coretodget.c, score/src/coretodgetuptime.c, score/src/coretodset.c, score/src/coretodtickle.c, score/src/threaddispatch.c, score/src/threadinitialize.c: Add SuperCore handler Timestamp to provide an opaque class for the representation and manipulation of uptime, time of day, and the difference between two timestamps. By using SuperCore Timestamp, it is clear which methods and APIs really have to be struct timespec and which can be in an optimized native format. * score/include/rtems/score/timestamp.h, score/src/coretodgetuptimetimespec.c: New files.
2008-08-182008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-5/+10
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c, libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-monitor.c, libmisc/serdbg/serdbg.c, libmisc/serdbg/serdbg.h, libnetworking/netinet/in_cksum_powerpc.h, shttpd/compat_rtems.h: Fix warnings.
2008-06-062008-06-06 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-1/+1
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-task.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Add typedefs for cpu usage and period timing statistics. Also renamed related variables and structure members so they are the same whether you are using nanosecond (e.g. struct timespec) or ticks (e.g. uint32_t) granularity. This lays the groundwork for future cleanup.
2007-07-242007-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-0/+1
* libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, score/src/timespecdivide.c: Fix various math and reporting bugs. Now the time appears to be reported correctly and add up to what is expected.
2007-07-182007-07-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+6
* libmisc/Makefile.am, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c: Fix bug where cpu usage calculation was always using uptime not time since last cpu usage reset when using nanoseconds granularity. * libmisc/cpuuse/cpuusagedata.c: New file.
2007-05-212007-05-21 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-0/+50
* libmisc/Makefile.am, libmisc/cpuuse/README: Split remaining CPU Usage functionality into multiple files to eliminate unnecessary cohesion. Update README. * libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c: New files. * libmisc/cpuuse/cpuuse.c: Removed.