[rtems commit] rtems: Create ratemon implementation header

Sebastian Huber sebh at rtems.org
Tue Jul 23 13:09:30 UTC 2013


Module:    rtems
Branch:    master
Commit:    ecdcf01adddae75aaf496e95425ef927aeffca15
Changeset: http://git.rtems.org/rtems/commit/?id=ecdcf01adddae75aaf496e95425ef927aeffca15

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 23 13:13:45 2013 +0200

rtems: Create ratemon implementation header

Move implementation specific parts of ratemon.h and ratemon.inl into
new header file ratemonimpl.h.  The ratemon.h contains now only the
application visible API.

---

 cpukit/libcsupport/src/resource_snapshot.c     |    1 +
 cpukit/rtems/Makefile.am                       |    2 +-
 cpukit/rtems/include/rtems/rtems/ratemon.h     |  167 +-------------
 cpukit/rtems/include/rtems/rtems/ratemonimpl.h |  279 ++++++++++++++++++++++++
 cpukit/rtems/inline/rtems/rtems/ratemon.inl    |  127 -----------
 cpukit/rtems/preinstall.am                     |    8 +-
 cpukit/rtems/src/ratemon.c                     |    2 +-
 cpukit/rtems/src/ratemoncancel.c               |    2 +-
 cpukit/rtems/src/ratemoncreate.c               |    2 +-
 cpukit/rtems/src/ratemondata.c                 |    3 +-
 cpukit/rtems/src/ratemondelete.c               |    2 +-
 cpukit/rtems/src/ratemongetstatistics.c        |    2 +-
 cpukit/rtems/src/ratemongetstatus.c            |    2 +-
 cpukit/rtems/src/ratemonident.c                |    2 +-
 cpukit/rtems/src/ratemonperiod.c               |    2 +-
 cpukit/rtems/src/ratemonreportstatistics.c     |    9 +-
 cpukit/rtems/src/ratemonresetall.c             |    2 +-
 cpukit/rtems/src/ratemonresetstatistics.c      |    2 +-
 cpukit/rtems/src/ratemontimeout.c              |    2 +-
 cpukit/sapi/src/rtemsapi.c                     |    2 +-
 testsuites/sptests/spintrcritical08/init.c     |    1 +
 testsuites/sptests/spsize/size.c               |    4 +-
 22 files changed, 313 insertions(+), 312 deletions(-)

diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index eda4a53..fba0b3d 100644
--- a/cpukit/libcsupport/src/resource_snapshot.c
+++ b/cpukit/libcsupport/src/resource_snapshot.c
@@ -30,6 +30,7 @@
 #include <rtems/rtems/barrierimpl.h>
 #include <rtems/rtems/dpmemimpl.h>
 #include <rtems/rtems/messageimpl.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/rtems/semimpl.h>
 
 #ifdef RTEMS_POSIX_API
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 512b0f6..1a95dc5 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -37,6 +37,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/options.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/optionsimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/part.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/ratemonimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/region.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/rtemsapi.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/sem.h
@@ -67,7 +68,6 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
 endif
 
 include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl
-include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/tasks.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/timer.inl
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 634889a..942fbaf 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 */
diff --git a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h
new file mode 100644
index 0000000..584b45e
--- /dev/null
+++ b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h
@@ -0,0 +1,279 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicRateMonImpl
+ *
+ * @brief Classic Rate Monotonic Scheduler Implementation
+ */
+
+/*  COPYRIGHT (c) 1989-2008.
+ *  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.
+ */
+
+#ifndef _RTEMS_RTEMS_RATEMONIMPL_H
+#define _RTEMS_RTEMS_RATEMONIMPL_H
+
+#include <rtems/rtems/ratemon.h>
+
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup ClassicRateMonImpl Classic Rate Monotonic Scheduler Implementation
+ *
+ * @ingroup ClassicRateMon
+ *
+ * @{
+ */
+
+/**
+ *  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
+
+/**
+ *  @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 Allocates a period control block from
+ *  the inactive chain of free period control blocks.
+ *
+ *  This function allocates a period control block from
+ *  the inactive chain of free period control blocks.
+ */
+RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
+{
+  return (Rate_monotonic_Control *)
+    _Objects_Allocate( &_Rate_monotonic_Information );
+}
+
+/**
+ *  @brief Allocates a period control block from
+ *  the inactive chain of free period control blocks.
+ *
+ *  This routine allocates a period control block from
+ *  the inactive chain of free period control blocks.
+ */
+RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free (
+  Rate_monotonic_Control *the_period
+)
+{
+  _Objects_Free( &_Rate_monotonic_Information, &the_period->Object );
+}
+
+/**
+ *  @brief Maps period IDs to period control blocks.
+ *
+ *  This function maps period IDs to period control blocks.
+ *  If ID corresponds to a local period, then it returns
+ *  the_period control pointer which maps to ID and location
+ *  is set to OBJECTS_LOCAL.  Otherwise, location is set
+ *  to OBJECTS_ERROR and the_period is undefined.
+ */
+RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
+  Objects_Id         id,
+  Objects_Locations *location
+)
+{
+  return (Rate_monotonic_Control *)
+    _Objects_Get( &_Rate_monotonic_Information, id, location );
+}
+
+/**
+ *  @brief Checks if the_period is in the ACTIVE state.
+ *
+ *  This function returns TRUE if the_period is in the ACTIVE state,
+ *  and FALSE otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_active (
+  Rate_monotonic_Control *the_period
+)
+{
+  return (the_period->state == RATE_MONOTONIC_ACTIVE);
+}
+
+/**
+ *  @brief Checks if the_period is in the ACTIVE state.
+ *
+ *  This function returns TRUE if the_period is in the ACTIVE state,
+ *  and FALSE otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_inactive (
+  Rate_monotonic_Control *the_period
+)
+{
+  return (the_period->state == RATE_MONOTONIC_INACTIVE);
+}
+
+/**
+ *  @brief Checks if the_period is in the EXPIRED state.
+ *
+ *  This function returns TRUE if the_period is in the EXPIRED state,
+ *  and FALSE otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_expired (
+  Rate_monotonic_Control *the_period
+)
+{
+  return (the_period->state == RATE_MONOTONIC_EXPIRED);
+}
+
+/**
+ *  @brief Checks if the_period is NULL.
+ *
+ *  This function returns TRUE if the_period is NULL and FALSE otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_null (
+  Rate_monotonic_Control *the_period
+)
+{
+  return (the_period == NULL);
+}
+
+/**
+ * @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)
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/ratemon.inl b/cpukit/rtems/inline/rtems/rtems/ratemon.inl
deleted file mode 100644
index 30b0361..0000000
--- a/cpukit/rtems/inline/rtems/rtems/ratemon.inl
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @file rtems/rtems/ratemon.inl
- *
- *  This file contains the static inline  implementation of the inlined
- *  routines in the Rate Monotonic Manager.
- */
-
-/*  COPYRIGHT (c) 1989-2008.
- *  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.
- */
-
-#ifndef _RTEMS_RTEMS_RATEMON_H
-# error "Never use <rtems/rtems/ratemon.inl> directly; include <rtems/rtems/ratemon.h> instead."
-#endif
-
-#ifndef _RTEMS_RTEMS_RATEMON_INL
-#define _RTEMS_RTEMS_RATEMON_INL
-
-/**
- *  @addtogroup ClassicRateMon
- *  @{
- */
-
-/**
- *  @brief Allocates a period control block from
- *  the inactive chain of free period control blocks.
- *
- *  This function allocates a period control block from
- *  the inactive chain of free period control blocks.
- */
-RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
-{
-  return (Rate_monotonic_Control *)
-    _Objects_Allocate( &_Rate_monotonic_Information );
-}
-
-/**
- *  @brief Allocates a period control block from
- *  the inactive chain of free period control blocks.
- *
- *  This routine allocates a period control block from
- *  the inactive chain of free period control blocks.
- */
-RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free (
-  Rate_monotonic_Control *the_period
-)
-{
-  _Objects_Free( &_Rate_monotonic_Information, &the_period->Object );
-}
-
-/**
- *  @brief Maps period IDs to period control blocks.
- *
- *  This function maps period IDs to period control blocks.
- *  If ID corresponds to a local period, then it returns
- *  the_period control pointer which maps to ID and location
- *  is set to OBJECTS_LOCAL.  Otherwise, location is set
- *  to OBJECTS_ERROR and the_period is undefined.
- */
-RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
-  Objects_Id         id,
-  Objects_Locations *location
-)
-{
-  return (Rate_monotonic_Control *)
-    _Objects_Get( &_Rate_monotonic_Information, id, location );
-}
-
-/**
- *  @brief Checks if the_period is in the ACTIVE state.
- *
- *  This function returns TRUE if the_period is in the ACTIVE state,
- *  and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_active (
-  Rate_monotonic_Control *the_period
-)
-{
-  return (the_period->state == RATE_MONOTONIC_ACTIVE);
-}
-
-/**
- *  @brief Checks if the_period is in the ACTIVE state.
- *
- *  This function returns TRUE if the_period is in the ACTIVE state,
- *  and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_inactive (
-  Rate_monotonic_Control *the_period
-)
-{
-  return (the_period->state == RATE_MONOTONIC_INACTIVE);
-}
-
-/**
- *  @brief Checks if the_period is in the EXPIRED state.
- *
- *  This function returns TRUE if the_period is in the EXPIRED state,
- *  and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_expired (
-  Rate_monotonic_Control *the_period
-)
-{
-  return (the_period->state == RATE_MONOTONIC_EXPIRED);
-}
-
-/**
- *  @brief Checks if the_period is NULL.
- *
- *  This function returns TRUE if the_period is NULL and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Rate_monotonic_Is_null (
-  Rate_monotonic_Control *the_period
-)
-{
-  return (the_period == NULL);
-}
-
-/**@}*/
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index b1140a3..3b28172 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -119,6 +119,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/ratemon.h: include/rtems/rtems/ratemon.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/ratemon.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/ratemon.h
 
+$(PROJECT_INCLUDE)/rtems/rtems/ratemonimpl.h: include/rtems/rtems/ratemonimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/ratemonimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/ratemonimpl.h
+
 $(PROJECT_INCLUDE)/rtems/rtems/region.h: include/rtems/rtems/region.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.h
@@ -213,10 +217,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/part.inl: inline/rtems/rtems/part.inl $(PROJECT_I
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.inl
 
-$(PROJECT_INCLUDE)/rtems/rtems/ratemon.inl: inline/rtems/rtems/ratemon.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/ratemon.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/ratemon.inl
-
 $(PROJECT_INCLUDE)/rtems/rtems/region.inl: inline/rtems/rtems/region.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.inl
diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c
index d96a9b0..59d1f0b 100644
--- a/cpukit/rtems/src/ratemon.c
+++ b/cpukit/rtems/src/ratemon.c
@@ -24,7 +24,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 void _Rate_monotonic_Manager_initialization(void)
diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c
index d50f801..81b28b2 100644
--- a/cpukit/rtems/src/ratemoncancel.c
+++ b/cpukit/rtems/src/ratemoncancel.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/ratemoncreate.c b/cpukit/rtems/src/ratemoncreate.c
index ae60514..b21ca4a 100644
--- a/cpukit/rtems/src/ratemoncreate.c
+++ b/cpukit/rtems/src/ratemoncreate.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/ratemondata.c b/cpukit/rtems/src/ratemondata.c
index f7a9d17..7c5e84b 100644
--- a/cpukit/rtems/src/ratemondata.c
+++ b/cpukit/rtems/src/ratemondata.c
@@ -21,5 +21,4 @@
 /* instantiate RTEMS period data */
 #define RTEMS_RATEMON_EXTERN
 
-#include <rtems/system.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
diff --git a/cpukit/rtems/src/ratemondelete.c b/cpukit/rtems/src/ratemondelete.c
index e1d732e..d05d03b 100644
--- a/cpukit/rtems/src/ratemondelete.c
+++ b/cpukit/rtems/src/ratemondelete.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/ratemongetstatistics.c b/cpukit/rtems/src/ratemongetstatistics.c
index eca0ce8..0cb594a 100644
--- a/cpukit/rtems/src/ratemongetstatistics.c
+++ b/cpukit/rtems/src/ratemongetstatistics.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 rtems_status_code rtems_rate_monotonic_get_statistics(
diff --git a/cpukit/rtems/src/ratemongetstatus.c b/cpukit/rtems/src/ratemongetstatus.c
index bd97bd0..673bc08 100644
--- a/cpukit/rtems/src/ratemongetstatus.c
+++ b/cpukit/rtems/src/ratemongetstatus.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
diff --git a/cpukit/rtems/src/ratemonident.c b/cpukit/rtems/src/ratemonident.c
index 1e45175..2786c4c 100644
--- a/cpukit/rtems/src/ratemonident.c
+++ b/cpukit/rtems/src/ratemonident.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 rtems_status_code rtems_rate_monotonic_ident(
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
index fc74aa2..93a76a0 100644
--- a/cpukit/rtems/src/ratemonperiod.c
+++ b/cpukit/rtems/src/ratemonperiod.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/rtems/src/ratemonreportstatistics.c b/cpukit/rtems/src/ratemonreportstatistics.c
index daf5fb5..cf7786d 100644
--- a/cpukit/rtems/src/ratemonreportstatistics.c
+++ b/cpukit/rtems/src/ratemonreportstatistics.c
@@ -18,13 +18,10 @@
 #include "config.h"
 #endif
 
-#include <rtems.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <inttypes.h>
+#include <rtems/rtems/ratemonimpl.h>
+#include <rtems/rtems/object.h>
 
-#include <rtems/bspIo.h>
-#include <rtems/score/timespec.h>
+#include <inttypes.h>
 
 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
   /* We print to 1/10's of milliseconds */
diff --git a/cpukit/rtems/src/ratemonresetall.c b/cpukit/rtems/src/ratemonresetall.c
index b2ed414..923f4f1 100644
--- a/cpukit/rtems/src/ratemonresetall.c
+++ b/cpukit/rtems/src/ratemonresetall.c
@@ -22,7 +22,7 @@
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/support.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 /*
diff --git a/cpukit/rtems/src/ratemonresetstatistics.c b/cpukit/rtems/src/ratemonresetstatistics.c
index 4269403..744e266 100644
--- a/cpukit/rtems/src/ratemonresetstatistics.c
+++ b/cpukit/rtems/src/ratemonresetstatistics.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 
 /*
diff --git a/cpukit/rtems/src/ratemontimeout.c b/cpukit/rtems/src/ratemontimeout.c
index 70d119a..947fa2f 100644
--- a/cpukit/rtems/src/ratemontimeout.c
+++ b/cpukit/rtems/src/ratemontimeout.c
@@ -23,7 +23,7 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdogimpl.h>
 
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index d4d440a..2077829 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -36,7 +36,7 @@
 #include <rtems/rtems/mp.h>
 #endif
 #include <rtems/rtems/part.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/rtems/region.h>
 #include <rtems/rtems/semimpl.h>
 #include <rtems/rtems/signal.h>
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c
index 534cd06..acb10de 100644
--- a/testsuites/sptests/spintrcritical08/init.c
+++ b/testsuites/sptests/spintrcritical08/init.c
@@ -14,6 +14,7 @@
 #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1
 #include <tmacros.h>
 #include <intrcritical.h>
+#include <rtems/rtems/ratemonimpl.h>
 
 /* forward declarations to avoid warnings */
 rtems_task Init(rtems_task_argument argument);
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index da0fb30..a9ce736 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -35,7 +35,7 @@
 #endif
 #include <rtems/rtems/part.h>
 #include <rtems/score/priority.h>
-#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/ratemonimpl.h>
 #include <rtems/rtems/region.h>
 #include <rtems/rtems/semimpl.h>
 #include <rtems/rtems/signal.h>
@@ -342,7 +342,7 @@ uninitialized =
 
 /*percpu.h*/    (_SMP_Get_processor_count() * sizeof(Per_CPU_Control))  +
 
-/*ratemon.h*/   (sizeof _Rate_monotonic_Information)      +
+/*ratemonimpl.h*/ (sizeof _Rate_monotonic_Information)    +
 
 /*region.h*/    (sizeof _Region_Information)              +
 




More information about the vc mailing list