Lines Matching +full:pre +full:- +full:timeout
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2004 Poul-Henning Kamp
63 static int wd_softtimeout_act = WD_SOFT_LOG; /* action for the software timeout */
66 static volatile u_int wd_last_u; /* last timeout value set by kern_do_pat */
67 static u_int wd_last_u_sysctl; /* last timeout value set by kern_do_pat */
89 ts->tv_sec = ns / 1000000000ULL; in pow2ns_to_ts()
90 ts->tv_nsec = ns % 1000000000ULL; in pow2ns_to_ts()
131 * if WD_LASTVAL is set, fill in the bits for timeout in wdog_kern_pat()
235 *remainp = ts.tv_sec - wd_lastpat; in wd_get_time_left()
247 snprintf(kdb_why, sizeof(kdb_why), "watchdog %s-timeout", type); in wd_timeout_cb()
253 log(LOG_EMERG, "watchdog %s-timeout, WD_SOFT_LOG\n", type); in wd_timeout_cb()
255 printf("watchdog %s-timeout, WD_SOFT_PRINTF\n", type); in wd_timeout_cb()
257 panic("watchdog %s-timeout, WD_SOFT_PANIC set", type); in wd_timeout_cb()
262 * newtimeout needs to be in the range of 0 to actual watchdog timeout.
263 * if 0, we disable the pre-timeout.
264 * otherwise we set the pre-timeout provided it's not greater than the
265 * current actual watchdog timeout.
276 /* do not permit a pre-timeout >= than the timeout. */ in wd_set_pretimeout()
280 * so as to disable the pre-watchdog in wd_set_pretimeout()
288 /* disable the pre-timeout */ in wd_set_pretimeout()
295 timeout_ticks = pow2ns_to_ticks(utime) - (hz*newtimeout); in wd_set_pretimeout()
299 "utime: %d -> utime_ticks: %d, " in wd_set_pretimeout()
301 "timeout_ticks: %d -> sec: %d\n", in wd_set_pretimeout()
310 timeout_ticks, wd_timeout_cb, "pre"); in wd_set_pretimeout()
331 /* If there is a pending timeout disallow this ioctl */ in wd_ioctl()
385 * Return the last timeout set, this is NOT the seconds from NOW until timeout,