time.9 renamed to time_second.9. various updates to reflect API changes.
This commit is contained in:
parent
083973a8e4
commit
43de604779
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.207 2006/07/27 00:00:56 gdt Exp $
|
||||
# $NetBSD: Makefile,v 1.208 2006/09/06 18:04:30 gdamore Exp $
|
||||
|
||||
# Makefile for section 9 (kernel function and variable) manual pages.
|
||||
|
||||
|
@ -38,7 +38,8 @@ MAN= altq.9 arc4random.9 arp.9 audio.9 autoconf.9 \
|
|||
SCHED_LOCK.9 scheduler.9 \
|
||||
scsipi.9 setjmp.9 setrunqueue.9 shutdownhook_establish.9 \
|
||||
signal.9 softintr.9 spl.9 store.9 suspendsched.9 \
|
||||
sysctl.9 tc.9 time.9 timecounter.9 todr.9 uiomove.9 ucom.9 userret.9 \
|
||||
sysctl.9 tc.9 timecounter.9 time_second.9 \
|
||||
todr.9 uiomove.9 ucom.9 userret.9 \
|
||||
vattr.9 veriexec.9 vcons.9 vfs.9 vfs_hooks.9 vfsops.9 vfssubr.9 vme.9 \
|
||||
vnfileops.9 vnode.9 vnodeops.9 vnsubr.9 \
|
||||
usbdi.9 uvm.9 wdc.9 \
|
||||
|
@ -502,7 +503,7 @@ MLINKS+=sysctl.9 old_sysctl.9 \
|
|||
sysctl.9 sysctl_query.9 \
|
||||
sysctl.9 sysctl_teardown.9 \
|
||||
sysctl.9 sysctl_unlock.9
|
||||
MLINKS+=time.9 boottime.9 time.9 mono_time.9
|
||||
MLINKS+=time_second.9 boottime.9 time_second.9 time_uptime.9
|
||||
MLINKS+=tc.9 tc_intr_establish.9 \
|
||||
tc.9 tc_intr_disestablish.9 \
|
||||
tc.9 tc_intr_evcnt.9 \
|
||||
|
@ -512,8 +513,7 @@ MLINKS+=tc.9 tc_intr_establish.9 \
|
|||
tc.9 tc_badaddr.9 \
|
||||
tc.9 TC_DENSE_TO_SPARSE.9 \
|
||||
tc.9 TC_PHYS_TO_UNCACHED.9
|
||||
MLINKS+=todr.9 todr_gettime.9 todr.9 todr_settime.9 \
|
||||
todr.9 todr_getcal.9 todr.9 todr_setcal.9 \
|
||||
MLINKS+=todr.9 todr_gettime.9 todr.9 todr_settime.9 todr.9 \
|
||||
todr.9 clock_ymdhms_to_secs.9 todr.9 clock_secs_to_ymdhms.9
|
||||
MLINKS+=uvm.9 uvm_init.9 uvm.9 uvm_init_limits.9 uvm.9 uvm_setpagesize.9 \
|
||||
uvm.9 uvm_swap_init.9 uvm.9 uvm_map.9 uvm.9 uvm_unmap.9 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: inittodr.9,v 1.10 2006/03/02 19:49:25 uwe Exp $
|
||||
.\" $NetBSD: inittodr.9,v 1.11 2006/09/06 18:04:30 gdamore Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Christopher G. Demetriou
|
||||
.\" All rights reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
.\"
|
||||
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
.\"
|
||||
.Dd March 2, 2006
|
||||
.Dd September 6, 2006
|
||||
.Dt INITTODR 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -52,10 +52,15 @@ system, as given in
|
|||
Those heuristics include:
|
||||
.Bl -bullet
|
||||
.It
|
||||
If the battery-backed clock has a valid time, it is used.
|
||||
If the battery-backed clock has a valid time, and is not significantly
|
||||
behind the time provided by
|
||||
.Fa base ,
|
||||
it is used.
|
||||
.It
|
||||
If the battery-backed clock does not have a valid time, and
|
||||
the time provided in
|
||||
If the battery-backed clock does not have a valid time, or is significantly
|
||||
behind the time provided in
|
||||
.Fa base ,
|
||||
and the time provided in
|
||||
.Fa base
|
||||
is within reason,
|
||||
.Fa base
|
||||
|
@ -64,8 +69,8 @@ is used as the current time.
|
|||
If the battery-backed clock appears invalid, and
|
||||
.Fa base
|
||||
appears non-sensical or was not provided (was given as zero),
|
||||
a arbitrary base (typically some time in the late 1970s)
|
||||
will be used.
|
||||
an arbitrary base (typically some time within the same year that
|
||||
the kernel was last updated) will be used.
|
||||
.El
|
||||
.Pp
|
||||
Once a system time has been determined, it is stored in the
|
||||
|
@ -79,6 +84,8 @@ out the system time.
|
|||
Conditions that can cause diagnostic messages to be printed include:
|
||||
.Bl -bullet
|
||||
.It
|
||||
There is no battery-backed clock present on the system.
|
||||
.It
|
||||
The battery-backed clock's time appears nonsensical.
|
||||
.It
|
||||
The
|
||||
|
@ -94,5 +101,5 @@ time and the battery-backed clock's time differ by a large amount.
|
|||
.Xr resettodr 9 ,
|
||||
.Xr time 9
|
||||
.Sh BUGS
|
||||
Each system's heuristics for picking the correct time are slightly
|
||||
Some system use heuristics for picking the correct time that are slightly
|
||||
different.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: resettodr.9,v 1.9 2006/03/02 19:47:25 uwe Exp $
|
||||
.\" $NetBSD: resettodr.9,v 1.10 2006/09/06 18:04:30 gdamore Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Christopher G. Demetriou
|
||||
.\" All rights reserved.
|
||||
|
@ -44,10 +44,8 @@
|
|||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn resettodr
|
||||
function sets the system's battery-backed clock based on the contents
|
||||
of the system
|
||||
.Va time
|
||||
variable.
|
||||
function sets the system's battery-backed clock based on the current
|
||||
system time.
|
||||
.Sh SEE ALSO
|
||||
.Xr clock_secs_to_ymdhms 9 ,
|
||||
.Xr inittodr 9 ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: time.9,v 1.15 2005/10/01 04:09:06 yamt Exp $
|
||||
.\" $NetBSD: time_second.9,v 1.1 2006/09/06 18:04:30 gdamore Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1994 Christopher G. Demetriou
|
||||
.\" All rights reserved.
|
||||
|
@ -32,23 +32,23 @@
|
|||
.\"
|
||||
.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
.\"
|
||||
.Dd October 1, 2005
|
||||
.Dt TIME 9
|
||||
.Dd September 6, 2006
|
||||
.Dt TIME_SECOND 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm boottime ,
|
||||
.Nm mono_time ,
|
||||
.Nm time
|
||||
.Nm time_second ,
|
||||
.Nm time_uptime
|
||||
.Nd system time variables
|
||||
.Sh SYNOPSIS
|
||||
.Va extern struct timeval boottime;
|
||||
.br
|
||||
.Va extern volatile struct timeval mono_time;
|
||||
.Va extern time_t time_uptime;
|
||||
.br
|
||||
.Va extern volatile struct timeval time;
|
||||
.Va extern time_t time_second;
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Va time
|
||||
.Va time_second
|
||||
variable is the system's
|
||||
.Dq wall time
|
||||
clock.
|
||||
|
@ -68,10 +68,10 @@ with
|
|||
.Xr settimeofday 2 .
|
||||
.Pp
|
||||
The
|
||||
.Va mono_time
|
||||
.Va time_uptime
|
||||
variable is a monotonically increasing system clock.
|
||||
It is set from
|
||||
.Va time
|
||||
.Va time_second
|
||||
at boot, and is updated by the periodic timer interrupt.
|
||||
(It is not updated by
|
||||
.Xr settimeofday 2 . )
|
||||
|
@ -82,9 +82,9 @@ January 1, 1970.
|
|||
.Pp
|
||||
Clock interrupts should be blocked
|
||||
when reading or writing
|
||||
.Va time
|
||||
.Va time_second
|
||||
or
|
||||
.Va mono_time ,
|
||||
.Va time_uptime ,
|
||||
because those variables are updated by
|
||||
.Fn hardclock .
|
||||
.Va boottime
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: todr.9,v 1.12 2005/11/09 23:47:37 wiz Exp $
|
||||
.\" $NetBSD: todr.9,v 1.13 2006/09/06 18:04:30 gdamore Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
|
@ -34,15 +34,13 @@
|
|||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd November 6, 2005
|
||||
.Dd September 6, 2006
|
||||
.Dt TODR 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm todr_attach ,
|
||||
.Nm todr_gettime ,
|
||||
.Nm todr_settime ,
|
||||
.Nm todr_getcal ,
|
||||
.Nm todr_setcal ,
|
||||
.Nm clock_ymdhms_to_secs ,
|
||||
.Nm clock_secs_to_ymdhms
|
||||
.Nd time-of-day clock support
|
||||
|
@ -54,10 +52,6 @@
|
|||
.Fn todr_gettime "todr_chip_handle_t" "struct timeval *"
|
||||
.Ft int
|
||||
.Fn todr_settime "todr_chip_handle_t" "struct timeval *"
|
||||
.Ft int
|
||||
.Fn todr_getcal "todr_chip_handle_t" "int *"
|
||||
.Ft int
|
||||
.Fn todr_setcal "todr_chip_handle_t" "int"
|
||||
.Ft void
|
||||
.Fn clock_secs_to_ymdhms "int" "struct clock_ymdhms *"
|
||||
.Ft time_t
|
||||
|
@ -94,19 +88,6 @@ according to the
|
|||
.Fa struct timeval
|
||||
argument.
|
||||
.Pp
|
||||
.Fn todr_setcal
|
||||
specifies a calibration value in PPM units to be programmed in the TODR
|
||||
device.
|
||||
Positive values shall speed up the TODR clock, negative values
|
||||
shall slow it down.
|
||||
If the device in not capable of handling calibration,
|
||||
this function shall return
|
||||
.Va EOPNOTSUPP .
|
||||
The measurement and calculations necessary to use this method is
|
||||
expected to be provided by higher-level software modules.
|
||||
.Fn todr_getcal
|
||||
returns the current calibration (in PPM units) in effect on the TODR device.
|
||||
.Pp
|
||||
The utilities
|
||||
.Fn clock_secs_to_ymdhms
|
||||
and
|
||||
|
|
Loading…
Reference in New Issue