aboutsummaryrefslogtreecommitdiff
path: root/build2/context.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-04-09 10:33:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-04-09 10:33:59 +0200
commitac838a3c051e8f15514f0454b060d00695b372f7 (patch)
tree368cbd8f885c25f5e5fc4c5f914434ef2839fa8e /build2/context.ixx
parent79a760af92146a63e337c4399ec57134f56d8886 (diff)
Add dry-run support to test rules
Diffstat (limited to 'build2/context.ixx')
-rw-r--r--build2/context.ixx25
1 files changed, 25 insertions, 0 deletions
diff --git a/build2/context.ixx b/build2/context.ixx
index 62f3d81..1c25922 100644
--- a/build2/context.ixx
+++ b/build2/context.ixx
@@ -7,6 +7,12 @@ namespace build2
// wait_guard
//
inline wait_guard::
+ wait_guard ()
+ : start_count (0), task_count (nullptr), phase (false)
+ {
+ }
+
+ inline wait_guard::
wait_guard (atomic_count& tc, bool p)
: wait_guard (0, tc, p)
{
@@ -25,6 +31,25 @@ namespace build2
wait ();
}
+ inline wait_guard::
+ wait_guard (wait_guard&& x)
+ : start_count (x.start_count), task_count (x.task_count), phase (x.phase)
+ {
+ x.task_count = nullptr;
+ }
+
+ inline wait_guard& wait_guard::
+ operator= (wait_guard&& x)
+ {
+ if (&x != this)
+ {
+ assert (task_count == nullptr);
+ start_count = x.start_count; task_count = x.task_count; phase = x.phase;
+ x.task_count = nullptr;
+ }
+ return *this;
+ }
+
inline void wait_guard::
wait ()
{