diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-15 06:50:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:35:29 +0200 |
commit | cf1670f9a6541e42f22d58e2de5940e64cb6637e (patch) | |
tree | efb80b4b34d447b2f36658c7f1a6a70d47547f5b /libbuild2/action.hxx | |
parent | 3861606766939fffd3bf110420e377bf194e02b7 (diff) |
Implement ad hoc recipe sharing and locking
Diffstat (limited to 'libbuild2/action.hxx')
-rw-r--r-- | libbuild2/action.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libbuild2/action.hxx b/libbuild2/action.hxx index 5898ba8..906d7eb 100644 --- a/libbuild2/action.hxx +++ b/libbuild2/action.hxx @@ -61,6 +61,8 @@ namespace build2 { action (): inner_id (0), outer_id (0) {} // Invalid action. + action (action_id a): action (a >> 4, a & 0xF) {} + // If this is not a nested operation, then outer should be 0. // action (meta_operation_id m, operation_id inner, operation_id outer = 0) @@ -103,6 +105,11 @@ namespace build2 inline bool operator!= (action x, action y) {return !(x == y);} + inline bool operator== (action x, action_id y) {return x == action (y);} + inline bool operator!= (action x, action_id y) {return x != action (y);} + inline bool operator== (action_id x, action y) {return action (x) == y;} + inline bool operator!= (action_id x, action y) {return action (x) == y;} + bool operator> (action, action) = delete; bool operator< (action, action) = delete; bool operator>= (action, action) = delete; |