aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/time.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-07-27 11:08:59 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-07-27 11:08:59 +0000
commit584b675ed657ee94cabcf475b1ed73bee4eb4054 (patch)
treee08e805219bd39e9a9c2d5cd174b1732cebd707f /sys/sys/time.h
parentdc831186e32a0fbb7452d890f9ca459e192bae1d (diff)
downloadsrc-584b675ed657ee94cabcf475b1ed73bee4eb4054.tar.gz
src-584b675ed657ee94cabcf475b1ed73bee4eb4054.zip
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
Notes
Notes: svn path=/head/; revision=303382
Diffstat (limited to 'sys/sys/time.h')
-rw-r--r--sys/sys/time.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/time.h b/sys/sys/time.h
index 395e8886a6ec..659f8e032da5 100644
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -372,8 +372,6 @@ void resettodr(void);
extern volatile time_t time_second;
extern volatile time_t time_uptime;
-extern struct bintime boottimebin;
-extern struct timeval boottime;
extern struct bintime tc_tick_bt;
extern sbintime_t tc_tick_sbt;
extern struct bintime tick_bt;
@@ -440,6 +438,9 @@ void getbintime(struct bintime *bt);
void getnanotime(struct timespec *tsp);
void getmicrotime(struct timeval *tvp);
+void getboottime(struct timeval *boottime);
+void getboottimebin(struct bintime *boottimebin);
+
/* Other functions */
int itimerdecr(struct itimerval *itp, int usec);
int itimerfix(struct timeval *tv);