summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-07-27 11:08:59 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 07:04:11 +0200
commitd310aa7c617c35c64c315b5c68753078c118b522 (patch)
treeccc1f25fc51c4418fc7cea011ce23e47d644535c /cpukit/score/include/rtems
parenttimecounter: Merge FreeBSD change r298981 (diff)
downloadrtems-d310aa7c617c35c64c315b5c68753078c118b522.tar.bz2
timecounter: Merge FreeBSD change r303382
Hide the boottime and bootimebin globals, provide the getboottime(9) and getboottimebin(9) KPI. Change consumers of boottime to use the KPI. The variables were renamed to avoid shadowing issues with local variables of the same name. Issue is that boottime* should be adjusted from tc_windup(), which requires them to be members of the timehands structure. As a preparation, this commit only introduces the interface. Some uses of boottime were found doubtful, e.g. NLM uses boottime to identify the system boot instance. Arguably the identity should not change on the leap second adjustment, but the commit is about the timekeeping code and the consumers were kept bug-to-bug compatible. Tested by: pho (as part of the bigger patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Update #3175.
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r--cpukit/score/include/rtems/score/timecounter.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/cpukit/score/include/rtems/score/timecounter.h b/cpukit/score/include/rtems/score/timecounter.h
index f7912a5fd8..1c318e2a78 100644
--- a/cpukit/score/include/rtems/score/timecounter.h
+++ b/cpukit/score/include/rtems/score/timecounter.h
@@ -154,6 +154,20 @@ void _Timecounter_Getnanouptime( struct timespec *ts );
void _Timecounter_Getmicrouptime( struct timeval *tv );
/**
+ * @brief Returns the boot time in the timeval format.
+ *
+ * @param[out] tv Returns the boot time.
+ */
+void _Timecounter_Getboottime( struct timeval *tv );
+
+/**
+ * @brief Returns the boot time in the bintime format.
+ *
+ * @param[out] tv Returns the boot time.
+ */
+void _Timecounter_Getboottimebin( struct bintime *bt );
+
+/**
* @brief Installs the timecounter.
*
* The timecounter structure must contain valid values in the fields
@@ -216,13 +230,6 @@ extern volatile time_t _Timecounter_Time_second;
extern volatile time_t _Timecounter_Time_uptime;
/**
- * @brief The binary boot time.
- *
- * The boot time changes via _Timecounter_Set_clock().
- */
-extern struct bintime _Timecounter_Boottimebin;
-
-/**
* @brief The current timecounter.
*/
extern struct timecounter *_Timecounter;