summaryrefslogtreecommitdiff
path: root/manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
commit034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8 (patch)
treeea59315075d3ebda2de695b1bd0621d79fa9e987 /manager.h
parent9152c765065184d0c1267ed2499e3fe4cac53755 (diff)
first attempt at proper service/socket logic
Diffstat (limited to 'manager.h')
-rw-r--r--manager.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/manager.h b/manager.h
index 6e0b500e5b..ddc9610e39 100644
--- a/manager.h
+++ b/manager.h
@@ -8,6 +8,7 @@
#include <stdio.h>
typedef struct Manager Manager;
+typedef enum ManagerEventType ManagerEventType;
#include "name.h"
#include "job.h"
@@ -15,6 +16,12 @@ typedef struct Manager Manager;
#include "list.h"
#include "set.h"
+enum ManagerEventType {
+ MANAGER_SIGNAL,
+ MANAGER_FD,
+ MANAGER_TIMER
+};
+
struct Manager {
uint32_t current_job_id;
@@ -29,11 +36,15 @@ struct Manager {
/* Names that need to be loaded */
LIST_HEAD(Meta, load_queue); /* this is actually more a stack than a queue, but uh. */
+ /* Jobs that need to be run */
+ LIST_HEAD(Job, run_queue); /* more a stack than a queue, too */
+
/* Jobs to be added */
Hashmap *transaction_jobs; /* Name object => Job object list 1:1 */
JobDependency *transaction_anchor;
bool dispatching_load_queue:1;
+ bool dispatching_run_queue:1;
Hashmap *watch_pids; /* pid => Name object n:1 */
@@ -57,7 +68,7 @@ void manager_transaction_unlink_job(Manager *m, Job *j);
void manager_clear_jobs(Manager *m);
-void manager_run_jobs(Manager *m);
+void manager_dispatch_run_queue(Manager *m);
int manager_loop(Manager *m);
#endif