| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
const char* watchdog_get_device(void); |
| 7 |
usec_t watchdog_get_last_ping(clockid_t clock); |
| 8 |
dual_timestamp* watchdog_get_last_ping_as_dual_timestamp(dual_timestamp *ret); |
| 9 |
|
| 10 |
int watchdog_set_device(const char *path); |
| 11 |
int watchdog_setup(usec_t timeout); |
| 12 |
int watchdog_setup_pretimeout(usec_t timeout); |
| 13 |
int watchdog_setup_pretimeout_governor(const char *governor); |
| 14 |
int watchdog_ping(void); |
| 15 |
void watchdog_report_if_missing(void); |
| 16 |
void watchdog_close(bool disarm); |
| 17 |
usec_t watchdog_runtime_wait(unsigned divisor); |
| 18 |
|
| 19 |
static inline void watchdog_free_device(void) { |
| 20 |
(void) watchdog_set_device(NULL); |
| 21 |
} |