Hide the boottime and bootimebin globals, provide the getboottime(9)
authorkib <kib@FreeBSD.org>
Wed, 27 Jul 2016 11:08:59 +0000 (11:08 +0000)
committerkib <kib@FreeBSD.org>
Wed, 27 Jul 2016 11:08:59 +0000 (11:08 +0000)
commit42da5a695227ef4bcbb2f0adde9a9dd702c24bfd
treee08e805219bd39e9a9c2d5cd174b1732cebd707f
parent3202a130ab0386dc7aa9309d3d9172b044481353
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
15 files changed:
sys/compat/linprocfs/linprocfs.c
sys/fs/devfs/devfs_vnops.c
sys/fs/fdescfs/fdesc_vnops.c
sys/fs/nfs/nfsport.h
sys/fs/procfs/procfs_status.c
sys/kern/kern_acct.c
sys/kern/kern_proc.c
sys/kern/kern_tc.c
sys/kern/sys_procdesc.c
sys/net/altq/altq_subr.c
sys/net/bpf.c
sys/netpfil/ipfw/ip_fw_sockopt.c
sys/nfs/nfs_lock.c
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
sys/sys/time.h