X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=watchdog.h;h=e5c696a37fa974d404ed5e530ec9108e52679c07;hp=a774dd734d0a6e92855993471ae01d07c83766cb;hb=3c771f9e4ba46d3e39334cb20eab98221043f1e2;hpb=13259259bc53657617844660f2664f4b4fb4ac02 diff --git a/watchdog.h b/watchdog.h index a774dd7..e5c696a 100644 --- a/watchdog.h +++ b/watchdog.h @@ -15,6 +15,7 @@ #ifndef __PROCD_WATCHDOG_H #define __PROCD_WATCHDOG_H +#ifndef DISABLE_INIT void watchdog_init(int preinit); char* watchdog_fd(void); int watchdog_timeout(int timeout); @@ -22,5 +23,44 @@ int watchdog_frequency(int frequency); void watchdog_set_stopped(bool val); bool watchdog_get_stopped(void); void watchdog_no_cloexec(void); +void watchdog_ping(void); +#else +static inline void watchdog_init(int preinit) +{ +} + +static inline char* watchdog_fd(void) +{ + return ""; +} + +static inline int watchdog_timeout(int timeout) +{ + return 0; +} + +static inline int watchdog_frequency(int frequency) +{ + return 0; +} + +static inline void watchdog_set_stopped(bool val) +{ +} + +static inline bool watchdog_get_stopped(void) +{ + return true; +} + +static inline void watchdog_no_cloexec(void) +{ +} + +static inline void watchdog_ping(void) +{ +} + +#endif #endif