]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/watchdog.h
hwdb: Add mapping for Xiaomi Mipad 2 bottom bezel capacitive buttons
[thirdparty/systemd.git] / src / shared / watchdog.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
c2f1db8f 2#pragma once
e96d6be7 3
a8fbdf54
TA
4#include <stdbool.h>
5
6#include "time-util.h"
e96d6be7 7
10f3f4ed 8const char *watchdog_get_device(void);
10f3f4ed
YW
9usec_t watchdog_get_last_ping(clockid_t clock);
10
bcc3a183 11int watchdog_set_device(const char *path);
d74965e6 12int watchdog_setup(usec_t timeout);
5717062e 13int watchdog_setup_pretimeout(usec_t usec);
aff3a9e1 14int watchdog_setup_pretimeout_governor(const char *governor);
e96d6be7
LP
15int watchdog_ping(void);
16void watchdog_close(bool disarm);
c5f8a179 17usec_t watchdog_runtime_wait(void);
e4c98db3
EJ
18
19static inline void watchdog_free_device(void) {
20 (void) watchdog_set_device(NULL);
21}