diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-04-03 06:44:00 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-04-03 06:44:00 +0000 |
commit | 824d67623ad62bd55609de1dfeddd4a1166acfbf (patch) | |
tree | d0b9a9bb1e74b189037e2ff42e6c2a1cc87516f3 /share/man | |
parent | 6d9276db9d61cb13a2c1e700d05372452aa3e571 (diff) |
Long overdue updates for timecounter changes.
Feedback from jmc@, ok guenther@ for an earlier version.
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/man4.octeon/octrtc.4 | 6 | ||||
-rw-r--r-- | share/man/man9/Makefile | 4 | ||||
-rw-r--r-- | share/man/man9/hardclock.9 | 6 | ||||
-rw-r--r-- | share/man/man9/inittodr.9 | 21 | ||||
-rw-r--r-- | share/man/man9/microtime.9 | 6 | ||||
-rw-r--r-- | share/man/man9/ppsratecheck.9 | 6 | ||||
-rw-r--r-- | share/man/man9/ratecheck.9 | 8 | ||||
-rw-r--r-- | share/man/man9/resettodr.9 | 20 | ||||
-rw-r--r-- | share/man/man9/time_second.9 (renamed from share/man/man9/time.9) | 69 |
9 files changed, 44 insertions, 102 deletions
diff --git a/share/man/man4/man4.octeon/octrtc.4 b/share/man/man4/man4.octeon/octrtc.4 index 96296cb55ec..f9f2d3f08c5 100644 --- a/share/man/man4/man4.octeon/octrtc.4 +++ b/share/man/man4/man4.octeon/octrtc.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: octrtc.4,v 1.2 2014/01/15 15:06:17 jmc Exp $ +.\" $OpenBSD: octrtc.4,v 1.3 2016/04/03 06:43:59 jsg Exp $ .\" .\" Copyright (c) 2014 Paul Irofti <pirofti@openbsd.org> .\" @@ -15,7 +15,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" -.Dd $Mdocdate: January 15 2014 $ +.Dd $Mdocdate: April 3 2016 $ .Dt OCTRTC 4 octeon .Os .Sh NAME @@ -48,7 +48,7 @@ Known models missing a DS1377 clock: .Xr intro 4 , .Xr inittodr 9 , .Xr resettodr 9 , -.Xr time 9 +.Xr time_second 9 .Sh HISTORY The .Nm diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 14082f2a5f2..f93215863e5 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.274 2016/03/30 06:38:45 jmc Exp $ +# $OpenBSD: Makefile,v 1.275 2016/04/03 06:43:59 jsg Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -31,7 +31,7 @@ MAN= aml_evalnode.9 atomic_add_int.9 atomic_cas_uint.9 \ rtlabel_id2name.9 rtrequest.9 rwlock.9 SipHash24.9 sensor_attach.9 \ spl.9 srp_enter.9 srpl_rc_init.9 startuphook_establish.9 \ socreate.9 sosplice.9 style.9 syscall.9 systrace.9 sysctl_int.9 \ - task_add.9 tc_init.9 time.9 timeout.9 tsleep.9 tvtohz.9 \ + task_add.9 tc_init.9 time_second.9 timeout.9 tsleep.9 tvtohz.9 \ uiomove.9 uvm.9 usbd_close_pipe.9 usbd_open_pipe.9 usbd_transfer.9 \ vfs.9 vfs_busy.9 \ vfs_cache.9 vaccess.9 vclean.9 vcount.9 vdevgone.9 vfinddev.9 vflush.9 \ diff --git a/share/man/man9/hardclock.9 b/share/man/man9/hardclock.9 index f9a6ec6dc75..b411220b439 100644 --- a/share/man/man9/hardclock.9 +++ b/share/man/man9/hardclock.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hardclock.9,v 1.10 2015/09/14 15:14:55 schwarze Exp $ +.\" $OpenBSD: hardclock.9,v 1.11 2016/04/03 06:43:59 jsg Exp $ .\" .\" Copyright (c) 2001 Kenneth R Westerback .\" All rights reserved. @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: April 3 2016 $ .Dt HARDCLOCK 9 .Os .Sh NAME @@ -74,5 +74,5 @@ is implemented in the file .Xr hz 9 , .Xr microtime 9 , .Xr spl 9 , -.Xr time 9 , +.Xr time_second 9 , .Xr timeout 9 diff --git a/share/man/man9/inittodr.9 b/share/man/man9/inittodr.9 index e24077965ba..c4452ddecd9 100644 --- a/share/man/man9/inittodr.9 +++ b/share/man/man9/inittodr.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inittodr.9,v 1.10 2007/05/31 19:20:00 jmc Exp $ +.\" $OpenBSD: inittodr.9,v 1.11 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: inittodr.9,v 1.2 1996/03/27 21:16:06 jtc Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: April 3 2016 $ .Dt INITTODR 9 .Os .Sh NAME @@ -66,9 +66,9 @@ an arbitrary base (typically some time in the late 1970s) will be used. .El .Pp -Once a system time has been determined, it is stored in the -.Va time -variable. +Once a system time has been determined, it is passed to the +.Fn tc_setclock +function. .Sh DIAGNOSTICS The .Fn inittodr @@ -89,16 +89,7 @@ time and the battery-backed clock's time differ by a large amount. .El .Sh SEE ALSO .Xr resettodr 9 , -.Xr time 9 +.Xr time_second 9 .Sh BUGS -On many systems, -.Fn inittodr -has to convert from -a time expressed in terms of year, month, day, hours, minutes, -and seconds to -.Va time , -expressed in seconds. -Many of the implementations could share code, but do not. -.Pp Each system's heuristics for picking the correct time are slightly different. diff --git a/share/man/man9/microtime.9 b/share/man/man9/microtime.9 index 306afadb69e..8daa786d50e 100644 --- a/share/man/man9/microtime.9 +++ b/share/man/man9/microtime.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: microtime.9,v 1.15 2015/10/12 00:49:34 schwarze Exp $ +.\" $OpenBSD: microtime.9,v 1.16 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: microtime.9,v 1.2 1999/03/16 00:40:47 garbled Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 12 2015 $ +.Dd $Mdocdate: April 3 2016 $ .Dt MICROTIME 9 .Os .Sh NAME @@ -115,4 +115,4 @@ the bulk of the code is in the file .Xr hardclock 9 , .Xr hz 9 , .Xr inittodr 9 , -.Xr time 9 +.Xr time_second 9 diff --git a/share/man/man9/ppsratecheck.9 b/share/man/man9/ppsratecheck.9 index 3309146ca8b..7fbb19e29a3 100644 --- a/share/man/man9/ppsratecheck.9 +++ b/share/man/man9/ppsratecheck.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ppsratecheck.9,v 1.5 2013/06/04 19:27:11 schwarze Exp $ +.\" $OpenBSD: ppsratecheck.9,v 1.6 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: ppsratecheck.9,v 1.1 2000/08/03 00:09:39 itojun Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 4 2013 $ +.Dd $Mdocdate: April 3 2016 $ .Dt PPSRATECHECK 9 .Os .Sh NAME @@ -81,7 +81,7 @@ is called, and will be reset whenever necessary. .Xr log 9 , .Xr printf 9 , .Xr ratecheck 9 , -.Xr time 9 +.Xr time_second 9 .Sh HISTORY The .Fn ppsratecheck diff --git a/share/man/man9/ratecheck.9 b/share/man/man9/ratecheck.9 index 01543057aa2..4e36e33905d 100644 --- a/share/man/man9/ratecheck.9 +++ b/share/man/man9/ratecheck.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ratecheck.9,v 1.10 2013/06/04 19:27:12 schwarze Exp $ +.\" $OpenBSD: ratecheck.9,v 1.11 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: ratecheck.9,v 1.1.2.1 2000/02/18 20:26:43 he Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 4 2013 $ +.Dd $Mdocdate: April 3 2016 $ .Dt RATECHECK 9 .Os .Sh NAME @@ -45,7 +45,7 @@ function provides a simple time interval check which can be used when implementing time-based rate-limited actions. If the difference between the current monotonically-increasing system time -.Pq Va mono_time +.Pq Xr getmicrouptime 9 and .Fa lasttime is less than the value given by the @@ -130,7 +130,7 @@ drv_errhandler(int err1, int err2) .Sh SEE ALSO .Xr log 9 , .Xr printf 9 , -.Xr time 9 +.Xr time_second 9 .Sh HISTORY The .Fn ratecheck diff --git a/share/man/man9/resettodr.9 b/share/man/man9/resettodr.9 index ffdb16e59da..7d6284c625e 100644 --- a/share/man/man9/resettodr.9 +++ b/share/man/man9/resettodr.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resettodr.9,v 1.6 2007/05/31 19:20:01 jmc Exp $ +.\" $OpenBSD: resettodr.9,v 1.7 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: resettodr.9,v 1.1 1995/11/25 21:24:51 perry Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: April 3 2016 $ .Dt RESETTODR 9 .Os .Sh NAME @@ -44,16 +44,10 @@ The .Fn resettodr function sets the system's battery backed clock based on the contents of the system -.Va time -variable. +.Va time_second +variable or a function such as +.Xr microtime 9 . .Sh SEE ALSO .Xr inittodr 9 , -.Xr time 9 -.Sh BUGS -On many systems, -.Fn resettodr -has to convert from -.Va time -to a time expressed in terms of year, month, day, hours, minutes, -and seconds. -Many of the implementations could share code, but do not. +.Xr microtime 9 , +.Xr time_second 9 diff --git a/share/man/man9/time.9 b/share/man/man9/time_second.9 index 2f395fb0a1a..1e7f31ecd76 100644 --- a/share/man/man9/time.9 +++ b/share/man/man9/time_second.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: time.9,v 1.11 2007/05/31 19:20:01 jmc Exp $ +.\" $OpenBSD: time_second.9,v 1.1 2016/04/03 06:43:59 jsg Exp $ .\" $NetBSD: time.9,v 1.1 1995/11/25 21:24:53 perry Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou @@ -30,23 +30,19 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ -.Dt TIME 9 +.Dd $Mdocdate: April 3 2016 $ +.Dt TIME_SECOND 9 .Os .Sh NAME -.Nm boottime , -.Nm mono_time , -.Nm runtime , -.Nm time +.Nm time_second , +.Nm time_uptime .Nd system time variables .Sh SYNOPSIS -.Vt extern struct timeval boottime; -.Vt extern volatile struct timeval mono_time; -.Vt extern struct timeval runtime; -.Vt extern volatile struct timeval time; +.Vt extern volatile time_t time_second; +.Vt extern volatile time_t time_uptime; .Sh DESCRIPTION The -.Va time +.Va time_second variable is the system's .Dq wall time clock. @@ -57,64 +53,25 @@ and is updated by the system call and by periodic clock interrupts. .Pp The -.Va boottime -variable holds the system boot time. -It is set from -.Va time -at system boot, and is updated when the system time is adjusted -with -.Xr settimeofday 2 . -.Pp -The -.Va runtime -variable holds the time that the system switched to the -current process. -It is set after each context switch, -and is updated when the system time is adjusted with -.Xr settimeofday 2 . -Because -.Va runtime -is used for system accounting, it is set with the high-resolution -.Xr microtime 9 -function, rather than being copied from -.Va time . -.Pp -The -.Va mono_time +.Va time_uptime variable is a monotonically increasing system clock. -It is set from -.Va time -at boot, and is updated by the periodic timer interrupt. +It is set at boot, and is updated by the periodic timer interrupt. (It is not updated by .Xr settimeofday 2 . ) .Pp All of these variables contain times -expressed in seconds and microseconds since midnight (0 hour), +expressed in seconds since midnight (0 hour), 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 .Xr hardclock 9 . -.Va Boottime -and -.Va runtime -may be read and written without special precautions. .Sh SEE ALSO .Xr settimeofday 2 , .Xr hardclock 9 , .Xr hz 9 , .Xr inittodr 9 , .Xr microtime 9 -.Sh BUGS -.Va Runtime -should not be updated when the system time is -changed with -.Xr settimeofday 2 , -because it is used for resource accounting. -.Pp -The notion of having a single -.Va runtime -variable obviously won't be appropriate in multiprocessor systems. |