diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2016-07-27 11:08:59 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 07:04:11 +0200 |
commit | d310aa7c617c35c64c315b5c68753078c118b522 (patch) | |
tree | ccc1f25fc51c4418fc7cea011ce23e47d644535c /cpukit/libcsupport/include/machine/_kernel_time.h | |
parent | timecounter: Merge FreeBSD change r298981 (diff) | |
download | rtems-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 '')
-rw-r--r-- | cpukit/libcsupport/include/machine/_kernel_time.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libcsupport/include/machine/_kernel_time.h b/cpukit/libcsupport/include/machine/_kernel_time.h index 4eeebbadea..51fa719442 100644 --- a/cpukit/libcsupport/include/machine/_kernel_time.h +++ b/cpukit/libcsupport/include/machine/_kernel_time.h @@ -73,7 +73,6 @@ void resettodr(void); #define time_second _Timecounter_Time_second #define time_uptime _Timecounter_Time_uptime -#define boottimebin _Timecounter_Boottimebin extern struct timeval boottime; extern struct bintime tc_tick_bt; extern sbintime_t tc_tick_sbt; @@ -141,6 +140,9 @@ getsbinuptime(void) #define getnanotime(_tsp) _Timecounter_Getnanotime(_tsp) #define getmicrotime(_tvp) _Timecounter_Getmicrotime(_tvp) +#define getboottime(_tvp) _Timecounter_Getboottime(_tvp) +#define getboottimebin(_bt) _Timecounter_Getboottimebin(_bt) + /* Other functions */ int itimerdecr(struct itimerval *itp, int usec); int itimerfix(struct timeval *tv); |