summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/ratemon.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/ratemon.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h167
1 files changed, 9 insertions, 158 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 634889aeeb..942fbaff3d 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -31,18 +31,16 @@
#ifndef _RTEMS_RTEMS_RATEMON_H
#define _RTEMS_RTEMS_RATEMON_H
-/**
- * This constant is defined to extern most of the time when using
- * this header file. However by defining it to nothing, the data
- * declared in this header file can be instantiated. This is done
- * in a single per manager file.
- */
-#ifndef RTEMS_RATEMON_EXTERN
-#define RTEMS_RATEMON_EXTERN extern
-#endif
-
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/status.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
#include <rtems/bspIo.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @defgroup ClassicRateMon Rate Monotonic Scheduler
*
@@ -60,10 +58,6 @@
*/
/**@{*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* This is the public type used for the rate monotonic timing
* statistics.
@@ -88,15 +82,6 @@ extern "C" {
typedef uint32_t Rate_monotonic_Period_time_t;
#endif
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/support.h>
-
-#include <string.h>
-
-
/**
* The following enumerated type defines the states in which a
* period may be.
@@ -265,23 +250,6 @@ typedef struct {
} Rate_monotonic_Control;
/**
- * @brief Rate Monotonic Period Class Management Structure
- *
- * This instance of Objects_Information is used to manage the
- * set of rate monotonic period instances.
- */
-RTEMS_RATEMON_EXTERN Objects_Information _Rate_monotonic_Information;
-
-/**
- * @brief Rate Monotonic Manager Initialization
- *
- * This routine performs the initialization necessary for this manager.
- *
- * @note The Rate Monotonic Manager is built on top of the Watchdog Handler
- */
-void _Rate_monotonic_Manager_initialization(void);
-
-/**
* @brief Create a Period
*
* Rate Monotonic Manager
@@ -443,128 +411,11 @@ rtems_status_code rtems_rate_monotonic_period(
rtems_interval length
);
-/**
- * @brief Rate Monotonic Timeout
- *
- * This routine is invoked when the period represented
- * by ID expires. If the thread which owns this period is blocked
- * waiting for the period to expire, then it is readied and the
- * period is restarted. If the owning thread is not waiting for the
- * period to expire, then the period is placed in the EXPIRED
- * state and not restarted.
- *
- * @param[in] id is the period id
- */
-void _Rate_monotonic_Timeout(
- rtems_id id,
- void *ignored
-);
-
-/**
- * @brief _Rate_monotonic_Get_status(
- *
- * This routine is invoked to compute the elapsed wall time and cpu
- * time for a period.
- *
- * @param[in] the_period points to the period being operated upon.
- * @param[out] wall_since_last_period is set to the wall time elapsed
- * since the period was initiated.
- * @param[out] cpu_since_last_period is set to the cpu time used by the
- * owning thread since the period was initiated.
- *
- * @retval This routine returns true if the status can be determined
- * and false otherwise.
- */
-bool _Rate_monotonic_Get_status(
- Rate_monotonic_Control *the_period,
- Rate_monotonic_Period_time_t *wall_since_last_period,
- Thread_CPU_usage_t *cpu_since_last_period
-);
-
-/**
- * @brief Initiate Rate Monotonic Statistics
- *
- * This routine is invoked when a period is initiated via an explicit
- * call to rtems_rate_monotonic_period for the period's first iteration
- * or from _Rate_monotonic_Timeout for period iterations 2-n.
- *
- * @param[in] the_period points to the period being operated upon.
- */
-void _Rate_monotonic_Initiate_statistics(
- Rate_monotonic_Control *the_period
-);
-
-/**
- * @brief _Rate_monotonic_Reset_wall_time_statistics
- *
- * This method resets the statistics information for a period instance.
- */
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- #define _Rate_monotonic_Reset_wall_time_statistics( _the_period ) \
- do { \
- /* set the minimums to a large value */ \
- _Timestamp_Set( \
- &(_the_period)->Statistics.min_wall_time, \
- 0x7fffffff, \
- 0x7fffffff \
- ); \
- } while (0)
-#else
- #define _Rate_monotonic_Reset_wall_time_statistics( _the_period ) \
- do { \
- /* set the minimum to a large value */ \
- (_the_period)->Statistics.min_wall_time = 0xffffffff; \
- } while (0)
-#endif
-
-/**
- * @brief Rate_monotonic_Reset_cpu_use_statistics
- *
- * This helper method resets the period CPU usage statistics structure.
- */
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- #define _Rate_monotonic_Reset_cpu_use_statistics( _the_period ) \
- do { \
- /* set the minimums to a large value */ \
- _Timestamp_Set( \
- &(_the_period)->Statistics.min_cpu_time, \
- 0x7fffffff, \
- 0x7fffffff \
- ); \
- } while (0)
-#else
- #define _Rate_monotonic_Reset_cpu_use_statistics( _the_period ) \
- do { \
- /* set the minimum to a large value */ \
- (_the_period)->Statistics.min_cpu_time = 0xffffffff; \
- } while (0)
-#endif
-
-/**
- * @brief Rate_monotonic_Reset_statistics
- *
- * This helper method resets the period wall time statistics structure.
- */
-#define _Rate_monotonic_Reset_statistics( _the_period ) \
- do { \
- memset( \
- &(_the_period)->Statistics, \
- 0, \
- sizeof( rtems_rate_monotonic_period_statistics ) \
- ); \
- _Rate_monotonic_Reset_cpu_use_statistics( _the_period ); \
- _Rate_monotonic_Reset_wall_time_statistics( _the_period ); \
- } while (0)
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/ratemon.inl>
-#endif
+/**@}*/
#ifdef __cplusplus
}
#endif
-/**@}*/
-
#endif
/* end of include file */