Files
rtems/cpukit/libmisc/cpuuse/cpuusagedata.c
Joel Sherrill 793dd46d64 2007-07-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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-07-18 21:31:49 +00:00

34 lines
741 B
C

/*
* CPU Usage Reporter - Shared Data
*
* COPYRIGHT (c) 1989-2007
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems.h>
#include <rtems/cpuuse.h>
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
#include <rtems/score/timespec.h>
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec CPU_usage_Uptime_at_last_reset;
#else
uint32_t CPU_usage_Ticks_at_last_reset;
#endif