diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-26 04:18:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-26 04:18:44 +0100 |
commit | 034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8 (patch) | |
tree | ea59315075d3ebda2de695b1bd0621d79fa9e987 /manager.h | |
parent | 9152c765065184d0c1267ed2499e3fe4cac53755 (diff) |
first attempt at proper service/socket logic
Diffstat (limited to 'manager.h')
-rw-r--r-- | manager.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 |