summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-11-05 06:14:33 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-05 17:08:35 (GMT)
commit6ce27d3a2efad4e40d4354a7d17e4259fb4c1e24 (patch)
treefdd14390b5c295105385f4703eed31067af2a264 /Source
parenta7c1e15cc46aa97cc19c9eb84fe8cad55c650bfa (diff)
downloadCMake-6ce27d3a2efad4e40d4354a7d17e4259fb4c1e24.zip
CMake-6ce27d3a2efad4e40d4354a7d17e4259fb4c1e24.tar.gz
CMake-6ce27d3a2efad4e40d4354a7d17e4259fb4c1e24.tar.bz2
cmCTestMultiProcessHandler: Rename resource locking functions
Renaming these ahead of other refactoring which will use the previous names. The previous names more accurately reflect their purpose after this commit anyway (talking about locking and unlocking rather than allocating and deallocating).
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx8
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 5248d2c..df36aa2 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -192,7 +192,7 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
// Always lock the resources we'll be using, even if we fail to set the
// working directory because FinishTestProcess() will try to unlock them
- this->AllocateResources(test);
+ this->LockResources(test);
if (!this->TestsHaveSufficientHardware[test]) {
testRun->StartFailure("Insufficient resources");
@@ -346,7 +346,7 @@ void cmCTestMultiProcessHandler::SetStopTimePassed()
}
}
-void cmCTestMultiProcessHandler::AllocateResources(int index)
+void cmCTestMultiProcessHandler::LockResources(int index)
{
this->LockedResources.insert(
this->Properties[index]->LockedResources.begin(),
@@ -357,7 +357,7 @@ void cmCTestMultiProcessHandler::AllocateResources(int index)
}
}
-void cmCTestMultiProcessHandler::DeallocateResources(int index)
+void cmCTestMultiProcessHandler::UnlockResources(int index)
{
for (std::string const& i : this->Properties[index]->LockedResources) {
this->LockedResources.erase(i);
@@ -603,7 +603,7 @@ void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner,
this->TestRunningMap[test] = false;
this->WriteCheckpoint(test);
this->DeallocateHardware(test);
- this->DeallocateResources(test);
+ this->UnlockResources(test);
this->RunningCount -= GetProcessorsUsed(test);
for (auto p : properties->Affinity) {
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index da716f0..f0ffdbb 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -134,8 +134,8 @@ protected:
bool CheckStopTimePassed();
void SetStopTimePassed();
- void AllocateResources(int index);
- void DeallocateResources(int index);
+ void LockResources(int index);
+ void UnlockResources(int index);
bool AllocateHardware(int index);
bool TryAllocateHardware(