aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-07 06:19:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-07 06:19:51 +0200
commitc08b0ce638361a84d3648aacd4ffbd0da6c357d8 (patch)
treeafee2de836d4f3702adb094c06171a5c3603be41 /libbuild2/context.cxx
parentade1111af0e0d253418c0707ad4e15b71a191348 (diff)
Distinguish between internal/external wait deactivation in scheduler
This turns out to be necessary for the deadlock detection to work properly.
Diffstat (limited to 'libbuild2/context.cxx')
-rw-r--r--libbuild2/context.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx
index d56abb3..d1bfc33 100644
--- a/libbuild2/context.cxx
+++ b/libbuild2/context.cxx
@@ -62,11 +62,11 @@ namespace build2
}
else if (phase != p)
{
- sched.deactivate ();
+ sched.deactivate (false /* external */);
for (; phase != p; v->wait (l)) ;
r = !fail_;
l.unlock (); // Important: activate() can block.
- sched.activate ();
+ sched.activate (false /* external */);
}
else
r = !fail_;
@@ -175,11 +175,11 @@ namespace build2
}
else // phase != n
{
- sched.deactivate ();
+ sched.deactivate (false /* external */);
for (; phase != n; v->wait (l)) ;
r = !fail_;
l.unlock (); // Important: activate() can block.
- sched.activate ();
+ sched.activate (false /* external */);
}
}