aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/operation.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-05 08:07:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-05 08:07:47 +0200
commit2905180c48e4b8974d4dee1949a00fc8e7bcafc6 (patch)
tree0dde0185bcbe36da05200c64ab12bb3b9af528c6 /libbuild2/operation.cxx
parent8b9701d2ad76a9a571c445b318557261a4922758 (diff)
Allow creating context with bare minimum of initializations
This is used by bpkg to detect forwarded configurations without incurring the full context creation overhead.
Diffstat (limited to 'libbuild2/operation.cxx')
-rw-r--r--libbuild2/operation.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx
index 2e5886c..d84db4f 100644
--- a/libbuild2/operation.cxx
+++ b/libbuild2/operation.cxx
@@ -278,11 +278,11 @@ namespace build2
// through a few hoops to make sure we don't overindulge.
//
md.incr = stderr_term // Scale depending on output type.
- ? (ctx.sched.serial () ? 1 : 5)
+ ? (ctx.sched->serial () ? 1 : 5)
: 100;
md.what = " targets to " + diag_do (ctx, a);
- mg = ctx.sched.monitor (
+ mg = ctx.sched->monitor (
ctx.target_count,
md.incr,
[&md] (size_t c) -> size_t
@@ -571,7 +571,7 @@ namespace build2
switch (ctx.current_inner_oif->concurrency)
{
- case 0: sched_tune = tune_guard (ctx.sched, 1); break; // Run serially.
+ case 0: sched_tune = tune_guard (*ctx.sched, 1); break; // Run serially.
case 1: break; // Run as is.
default: assert (false); // Not supported.
}
@@ -594,7 +594,7 @@ namespace build2
{
what = "% of targets " + diag_did (ctx, a);
- mg = ctx.sched.monitor (
+ mg = ctx.sched->monitor (
ctx.target_count,
init - incr,
[init, incr, &what, &ctx] (size_t c) -> size_t