diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-20 10:22:07 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-20 17:12:27 +0200 |
commit | 7527cb527598aaabf0ed9b38a352edb28536392a (patch) | |
tree | 1fe241bdb3dac4dfd94906de0ebce3ea627512a2 /src/core/manager.h | |
parent | 97e7d748d1bf26790fc3b2607885f4ac8c4ecf3a (diff) |
manager: Transaction as an object
This makes it obvious that transactions are short-lived. They are created in
manager_add_job() and destroyed after the application of jobs.
It also prepares for a split of the transaction code to a new source.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r-- | src/core/manager.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/manager.h b/src/core/manager.h index 0e9c0d7b4e..2bf7b7ae5e 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -33,6 +33,7 @@ #define MANAGER_MAX_NAMES 131072 /* 128K */ typedef struct Manager Manager; +typedef struct Transaction Transaction; typedef enum WatchType WatchType; typedef struct Watch Watch; @@ -91,6 +92,12 @@ struct Watch { #include "dbus.h" #include "path-lookup.h" +struct Transaction { + /* Jobs to be added */ + Hashmap *jobs; /* Unit object => Job object list 1:1 */ + JobDependency *anchor; +}; + struct Manager { /* Note that the set of units we know of is allowed to be * inconsistent. However the subset of it that is loaded may @@ -123,10 +130,6 @@ struct Manager { /* Units to check when doing GC */ LIST_HEAD(Unit, gc_queue); - /* Jobs to be added */ - Hashmap *transaction_jobs; /* Unit object => Job object list 1:1 */ - JobDependency *transaction_anchor; - Hashmap *watch_pids; /* pid => Unit object n:1 */ char *notify_socket; |