watchdog.c (279413) | watchdog.c (283291) |
---|---|
1/*- 2 * Copyright (c) 2004 Poul-Henning Kamp 3 * Copyright (c) 2013 iXsystems.com, 4 * author: Alfred Perlstein <alfred@freebsd.org> 5 * 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 */ 30 31#include "opt_ddb.h" 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Poul-Henning Kamp 3 * Copyright (c) 2013 iXsystems.com, 4 * author: Alfred Perlstein <alfred@freebsd.org> 5 * 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 17 unchanged lines hidden (view full) --- 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 */ 30 31#include "opt_ddb.h" 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/watchdog/watchdog.c 279413 2015-02-28 22:37:48Z rstone $"); | 34__FBSDID("$FreeBSD: head/sys/dev/watchdog/watchdog.c 283291 2015-05-22 17:05:21Z jkim $"); |
35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/systm.h> 39#include <sys/conf.h> 40#include <sys/uio.h> 41#include <sys/kernel.h> 42#include <sys/kdb.h> --- 341 unchanged lines hidden (view full) --- 384 .d_name = "watchdog", 385}; 386 387static int 388watchdog_modevent(module_t mod __unused, int type, void *data __unused) 389{ 390 switch(type) { 391 case MOD_LOAD: | 35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/systm.h> 39#include <sys/conf.h> 40#include <sys/uio.h> 41#include <sys/kernel.h> 42#include <sys/kdb.h> --- 341 unchanged lines hidden (view full) --- 384 .d_name = "watchdog", 385}; 386 387static int 388watchdog_modevent(module_t mod __unused, int type, void *data __unused) 389{ 390 switch(type) { 391 case MOD_LOAD: |
392 callout_init(&wd_pretimeo_handle, true); 393 callout_init(&wd_softtimeo_handle, true); | 392 callout_init(&wd_pretimeo_handle, 1); 393 callout_init(&wd_softtimeo_handle, 1); |
394 wd_dev = make_dev(&wd_cdevsw, 0, 395 UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG); 396 return 0; 397 case MOD_UNLOAD: 398 callout_stop(&wd_pretimeo_handle); 399 callout_stop(&wd_softtimeo_handle); 400 callout_drain(&wd_pretimeo_handle); 401 callout_drain(&wd_softtimeo_handle); 402 destroy_dev(wd_dev); 403 return 0; 404 case MOD_SHUTDOWN: 405 return 0; 406 default: 407 return EOPNOTSUPP; 408 } 409} 410 411DEV_MODULE(watchdog, watchdog_modevent, NULL); | 394 wd_dev = make_dev(&wd_cdevsw, 0, 395 UID_ROOT, GID_WHEEL, 0600, _PATH_WATCHDOG); 396 return 0; 397 case MOD_UNLOAD: 398 callout_stop(&wd_pretimeo_handle); 399 callout_stop(&wd_softtimeo_handle); 400 callout_drain(&wd_pretimeo_handle); 401 callout_drain(&wd_softtimeo_handle); 402 destroy_dev(wd_dev); 403 return 0; 404 case MOD_SHUTDOWN: 405 return 0; 406 default: 407 return EOPNOTSUPP; 408 } 409} 410 411DEV_MODULE(watchdog, watchdog_modevent, NULL); |