[rtems commit] score: Move _Watchdog_Ticks_since_boot definition

Sebastian Huber sebh at rtems.org
Wed Apr 8 05:41:22 UTC 2015


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Apr  8 07:40:00 2015 +0200

score: Move _Watchdog_Ticks_since_boot definition

---

 cpukit/score/Makefile.am                    |  1 +
 cpukit/score/include/rtems/score/watchdog.h |  2 +-
 cpukit/score/src/watchdogtickssinceboot.c   | 29 +++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 090f7f6..112f7e8 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -326,6 +326,7 @@ libscore_a_SOURCES += src/coretod.c src/coretodset.c src/coretodget.c \
 libscore_a_SOURCES += src/watchdog.c src/watchdogadjust.c \
     src/watchdogadjusttochain.c src/watchdoginsert.c src/watchdogremove.c \
     src/watchdogtickle.c
+libscore_a_SOURCES += src/watchdogtickssinceboot.c
 
 ## USEREXT_C_FILES
 libscore_a_SOURCES += src/userextaddset.c \
diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h
index 06c87a1..ff6c823 100644
--- a/cpukit/score/include/rtems/score/watchdog.h
+++ b/cpukit/score/include/rtems/score/watchdog.h
@@ -129,7 +129,7 @@ typedef struct {
  *
  * With a 1ms watchdog tick, this counter overflows after 50 days since boot.
  */
-SCORE_EXTERN volatile Watchdog_Interval _Watchdog_Ticks_since_boot;
+extern volatile Watchdog_Interval _Watchdog_Ticks_since_boot;
 
 /**@}*/
 
diff --git a/cpukit/score/src/watchdogtickssinceboot.c b/cpukit/score/src/watchdogtickssinceboot.c
new file mode 100644
index 0000000..668348c
--- /dev/null
+++ b/cpukit/score/src/watchdogtickssinceboot.c
@@ -0,0 +1,29 @@
+/**
+ *  @file
+ *
+ *  @brief Watchdog Ticks Since Boot
+ *  @ingroup ScoreWatchdog
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2009.
+ *  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.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/watchdog.h>
+
+/*
+ * This is defined in a separate module to allow the new network to define it
+ * with an additional strong reference.  Strong references cannot alias a
+ * common symbol.  Since the GCC option -fno-common is not used throughout
+ * RTEMS we cannot define it here.
+ */
+volatile Watchdog_Interval _Watchdog_Ticks_since_boot;




More information about the vc mailing list