1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <stdbool.h> 5 6 #include "time-util.h" 7 #include "util.h" 8 9 int watchdog_set_device(const char *path); 10 int watchdog_setup(usec_t timeout); 11 int watchdog_setup_pretimeout(usec_t usec); 12 int watchdog_setup_pretimeout_governor(const char *governor); 13 int watchdog_ping(void); 14 void watchdog_close(bool disarm); 15 usec_t watchdog_runtime_wait(void); 16 watchdog_free_device(void)17static inline void watchdog_free_device(void) { 18 (void) watchdog_set_device(NULL); 19 } 20