#define _GNU_SOURCE
+#if defined(NO_JOBS_WATCHDOG)
+# define HAS_WATCHDOG 0
+#else
+# define HAS_WATCHDOG 1
+#endif
+
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/eventfd.h>
#include <systemd/sd-event.h>
-#ifndef NO_JOBS_WATCHDOG
+#if HAS_WATCHDOG
#include <systemd/sd-daemon.h>
#endif
#include "verbose.h"
#if 0
-#define _alert_ "do you really want to remove monitoring?"
+#define _alert_ "do you really want to remove signal monitoring?"
#define sig_monitor_init_timeouts() ((void)0)
#define sig_monitor_clean_timeouts() ((void)0)
#define sig_monitor(to,cb,arg) (cb(0,arg))
if (job)
free_jobs = job->next;
else {
- /* allocation without blocking */
+ /* allocation without blocking */
pthread_mutex_unlock(&mutex);
job = malloc(sizeof *job);
pthread_mutex_lock(&mutex);
running = 0;
remains = waiter_count;
-#ifndef NO_JOBS_WATCHDOG
+#if HAS_WATCHDOG
/* set the watchdog */
if (sd_watchdog_enabled(0, NULL))
sd_event_set_watchdog(get_sd_event_locked(), 1);