diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2004-12-17 17:32:03 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2004-12-17 17:32:03 +0000 |
commit | bdf1d260e9307fce29460134545a24256ad15237 (patch) | |
tree | 5158b40dae78de3cb7d5d6b1a72416d1d9da99d3 | |
parent | 1b640e4ba9c00e3621f171f7e86f5cb974caade9 (diff) |
Add watchdog API documentation, from Michael Knudsen, with tweaks. ok grange jmc
-rw-r--r-- | share/man/man9/Makefile | 4 | ||||
-rw-r--r-- | share/man/man9/wdog_register.9 | 65 |
2 files changed, 67 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 8c79c117705..68a37e10acc 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.86 2004/11/30 14:47:59 pedro Exp $ +# $OpenBSD: Makefile,v 1.87 2004/12/17 17:32:02 jaredy Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -22,7 +22,7 @@ MAN= altq.9 audio.9 autoconf.9 boot.9 buffercache.9 bus_dma.9 bus_space.9 \ vaccess.9 vclean.9 vcount.9 vdevgone.9 vfinddev.9 vflush.9 \ vflushbuf.9 vget.9 vgone.9 vhold.9 vinvalbuf.9 vput.9 vref.9 \ vrele.9 vnode.9 VOP_LOOKUP.9 vn_lock.9 vrecycle.9 vwaitforio.9 \ - vwakeup.9 + vwakeup.9 wdog_register.9 MLINKS+=autoconf.9 config_init.9 autoconf.9 config_search.9 \ autoconf.9 config_rootsearch.9 autoconf.9 config_found_sm.9 \ diff --git a/share/man/man9/wdog_register.9 b/share/man/man9/wdog_register.9 new file mode 100644 index 00000000000..4f06b5f6079 --- /dev/null +++ b/share/man/man9/wdog_register.9 @@ -0,0 +1,65 @@ +.\" $OpenBSD: wdog_register.9,v 1.1 2004/12/17 17:32:02 jaredy Exp $ +.\" +.\" Copyright (c) 2004 Michael Knudsen <mk@molioner.dk> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd December 17, 2004 +.Dt WDOG_REGISTER 9 +.Os +.Sh NAME +.Nm wdog_register +.Nd kernel watchdog interface +.Sh SYNOPSIS +.In sys/systm.h +.Ft void +.Fn wdog_register "void *cb_arg" "int (*cb)(void *cb_arg, int period)" +.Sh DESCRIPTION +The kernel watchdog interface is used by hardware watchdog drivers and +should be used for all future drivers. +.Pp +.Fn wdog_register +is called by the hardware driver after configuring the hardware watchdog +device. +The +.Fa cb_arg +argument is a pointer to the hardware device control structure. +The +.Fa cb +argument is a pointer to a function supplied by the driver which sets +the timeout in the hardware device. +.Pp +The +.Fa cb_arg +parameter given to +.Fa cb +is a pointer to the device control structure. +The +.Fa period +parameter supplies the desired timeout value in seconds. +A +.Fa period +value of zero disables the watchdog. +Setting the timeout to a nonzero value after disabling the watchdog +will update the timeout value and enable the watchdog. +.Sh CODE REFERENCES +The framework is implemented in the file +.Pa sys/kern/kern_watchdog.c . +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr timeout 9 +.Sh HISTORY +The watchdog timer framework was written by +.An Markus Friedl Aq markus@openbsd.org +and first appeared in +.Ox 3.3 . |