Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add hardclock(9). Written by myself, improved via some comme...



details:   https://anonhg.NetBSD.org/src/rev/65ef2aa5fee3
branches:  trunk
changeset: 514701:65ef2aa5fee3
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Sep 09 03:07:09 2001 +0000

description:
Add hardclock(9). Written by myself, improved via some comments from
Christos (thanks!).

diffstat:

 distrib/sets/lists/comp/mi |   4 +-
 share/man/man9/Makefile    |   8 ++--
 share/man/man9/hardclock.9 |  80 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+), 5 deletions(-)

diffs (131 lines):

diff -r 3e6b8cd90d1a -r 65ef2aa5fee3 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Sun Sep 09 02:52:44 2001 +0000
+++ b/distrib/sets/lists/comp/mi        Sun Sep 09 03:07:09 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.366 2001/09/06 00:21:11 wiz Exp $
+#      $NetBSD: mi,v 1.367 2001/09/09 03:07:09 wiz Exp $
 ./sys                          comp-sysutil-root
 ./usr/bin/addr2line            comp-debug-bin
 ./usr/bin/ar                   comp-util-bin
@@ -3069,6 +3069,7 @@
 ./usr/share/man/cat9/fusword.0         comp-sys-catman
 ./usr/share/man/cat9/fuword.0          comp-sys-catman
 ./usr/share/man/cat9/gsignal.0         comp-sys-catman
+./usr/share/man/cat9/hardclock.0               comp-sys-catman
 ./usr/share/man/cat9/humanize_number.0         comp-sys-catman
 ./usr/share/man/cat9/hz.0              comp-sys-catman
 ./usr/share/man/cat9/i386/bios32_service.0             comp-sys-catman
@@ -5217,6 +5218,7 @@
 ./usr/share/man/man9/fusword.9         comp-sys-man
 ./usr/share/man/man9/fuword.9          comp-sys-man
 ./usr/share/man/man9/gsignal.9         comp-sys-man
+./usr/share/man/man9/hardclock.9               comp-sys-man
 ./usr/share/man/man9/humanize_number.9         comp-sys-man
 ./usr/share/man/man9/hz.9              comp-sys-man
 ./usr/share/man/man9/i386/bios32_service.9             comp-sys-man
diff -r 3e6b8cd90d1a -r 65ef2aa5fee3 share/man/man9/Makefile
--- a/share/man/man9/Makefile   Sun Sep 09 02:52:44 2001 +0000
+++ b/share/man/man9/Makefile   Sun Sep 09 03:07:09 2001 +0000
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.90 2001/09/04 04:01:49 wiz Exp $
+#       $NetBSD: Makefile,v 1.91 2001/09/09 03:07:10 wiz Exp $
 
 #      Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -8,9 +8,9 @@
        callout.9 cardbus.9 cnmagic.9 config.9 cons.9 copy.9 cpu_reboot.9 \
        ctxsw.9 disk.9 disklabel.9 \
        dopowerhooks.9 doshutdownhooks.9 driver.9 ethersubr.9 evcnt.9 \
-       extent.9 fetch.9 fork1.9 humanize_number.9 hz.9 in4_cksum.9 inittodr.9 \
-       intro.9 ioasic.9 ioctl.9 isa.9 isapnp.9 kprintf.9 kthread.9 \
-       linedisc.9 lock.9 log.9 malloc.9 mbuf.9 \
+       extent.9 fetch.9 fork1.9 hardclock.9 humanize_number.9 hz.9 \
+       in4_cksum.9 inittodr.9 intro.9 ioasic.9 ioctl.9 isa.9 isapnp.9 \
+       kprintf.9 kthread.9 linedisc.9 lock.9 log.9 malloc.9 mbuf.9 \
        memcmp.9 memcpy.9 memmove.9 memset.9 \
        microtime.9 panic.9 pci.9 pci_configure_bus.9 pci_intr.9 \
        pcmcia.9 pfil.9 physio.9 \
diff -r 3e6b8cd90d1a -r 65ef2aa5fee3 share/man/man9/hardclock.9
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man9/hardclock.9        Sun Sep 09 03:07:09 2001 +0000
@@ -0,0 +1,80 @@
+.\"    $NetBSD: hardclock.9,v 1.1 2001/09/09 03:07:10 wiz Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Thomas Klausner.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"        This product includes software developed by the NetBSD
+.\"        Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\"    contributors may be used to endorse or promote products derived
+.\"    from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (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 September 5, 2001
+.Dt HARDCLOCK 9
+.Os
+.Sh NAME
+.Nm hardclock
+.Nd real-time timer
+.Sh SYNOPSIS
+.Ft void
+.Fn hardclock "struct clockframe *"
+.Sh DESCRIPTION
+The
+.Fn hardclock
+function gets called
+.Xr hz 9
+times per second.
+It performs different tasks:
+.Bl -bullet -compact
+.It
+Run the current process's virtual and profile time (decrease the
+corresponding timers, if they are activated, and generate
+.Li SIGVTALRM
+or
+.Li SIGPROF ,
+respectively).
+.It
+Increment the time-of-day, taking care of any
+.Xr ntpd 8
+or
+.Xr adjtime 2
+induced changes and leap seconds, as well as any necessary
+compensations to keep in sync with PPS signals or external clocks, if
+support for this is in the kernel (see
+.Xr options 4 ) .
+.It
+Schedule softclock interrupts if any callouts should be triggered (see
+.Xr callout 9 ) .
+.El
+.Sh SEE ALSO
+.Xr adjtime 2 ,
+.Xr ntp_adjtime 2 ,
+.Xr signal 7 ,
+.Xr ntpd 8 ,
+.Xr callout 9 ,
+.Xr hz 9



Home | Main Index | Thread Index | Old Index