Allow to remove systemd library
[src/app-framework-binder.git] / src / jobs.c
index 936c6f1..4a9ce18 100644 (file)
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
-#include <time.h>
-#include <sys/syscall.h>
 #include <pthread.h>
 #include <errno.h>
 #include <assert.h>
-#include <sys/eventfd.h>
-
-#include <systemd/sd-event.h>
 
 #include "jobs.h"
 #include "evmgr.h"
 #include "sig-monitor.h"
 #include "verbose.h"
-#include "systemd.h"
 
 #define EVENT_TIMEOUT_TOP      ((uint64_t)-1)
 #define EVENT_TIMEOUT_CHILD    ((uint64_t)10000)
@@ -715,7 +709,7 @@ int jobs_call(
 /**
  * Ensure that the current running thread can control the event loop.
  */
-void jobs_acquire_event_manager()
+struct evmgr *jobs_acquire_event_manager()
 {
        struct thread lt;
 
@@ -755,6 +749,7 @@ void jobs_acquire_event_manager()
                evloop_release();
                current_thread = NULL;
        }
+       return evmgr;
 }
 
 /**