diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-08 07:42:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | 5cefca444f7062c61cc9d118ffea5901e05186fd (patch) | |
tree | 879d608f9a9084c7eaa4e5cb8bcad5650d966730 /build2/cc | |
parent | db2a696f810e41189bcdf5524696ff3d0cfbe5a9 (diff) |
Implement parallel operation execution
Diffstat (limited to 'build2/cc')
-rw-r--r-- | build2/cc/compile.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 5090f11..e08b40b 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -891,14 +891,17 @@ namespace build2 // auto update = [&trace, a] (path_target& pt, timestamp ts) -> bool { - if (pt.state () != target_state::unchanged) + //@@ MT extenal modification sync. + + target_state os (pt.atomic_state ()); //@@ MT: do we need atomic? + + if (os != target_state::unchanged) { // We only want to restart if our call to execute() actually // caused an update. In particular, the target could already // have been in target_state::changed because of a dependency // extraction run for some other source file. // - target_state os (pt.state ()); target_state ns (execute_direct (a, pt)); if (ns != os && ns != target_state::unchanged) |