[PATCH] score: Change _Timecounter_Time_uptime to int32_t

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 24 09:18:28 UTC 2017


Close #3185.
---
 cpukit/score/include/rtems/score/timecounter.h | 2 +-
 cpukit/score/src/kern_tc.c                     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/include/rtems/score/timecounter.h b/cpukit/score/include/rtems/score/timecounter.h
index 1c318e2a78..d8df6097eb 100644
--- a/cpukit/score/include/rtems/score/timecounter.h
+++ b/cpukit/score/include/rtems/score/timecounter.h
@@ -227,7 +227,7 @@ extern volatile time_t _Timecounter_Time_second;
  * For compatibility with the FreeBSD network stack the initial value is one
  * second.
  */
-extern volatile time_t _Timecounter_Time_uptime;
+extern volatile int32_t _Timecounter_Time_uptime;
 
 /**
  * @brief The current timecounter.
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index 55aa0ae255..99c6664fcb 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -203,10 +203,11 @@ int tc_min_ticktock_freq = 1;
 
 #ifndef __rtems__
 volatile time_t time_second = 1;
+volatile time_t time_uptime = 1;
 #else /* __rtems__ */
 volatile time_t time_second = TOD_SECONDS_1970_THROUGH_1988;
+volatile int32_t time_uptime = 1;
 #endif /* __rtems__ */
-volatile time_t time_uptime = 1;
 
 #ifndef __rtems__
 static int sysctl_kern_boottime(SYSCTL_HANDLER_ARGS);
-- 
2.12.3



More information about the devel mailing list