mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
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).
This commit is contained in:
@@ -192,7 +192,7 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
|
|||||||
|
|
||||||
// Always lock the resources we'll be using, even if we fail to set the
|
// Always lock the resources we'll be using, even if we fail to set the
|
||||||
// working directory because FinishTestProcess() will try to unlock them
|
// working directory because FinishTestProcess() will try to unlock them
|
||||||
this->AllocateResources(test);
|
this->LockResources(test);
|
||||||
|
|
||||||
if (!this->TestsHaveSufficientHardware[test]) {
|
if (!this->TestsHaveSufficientHardware[test]) {
|
||||||
testRun->StartFailure("Insufficient resources");
|
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->LockedResources.insert(
|
||||||
this->Properties[index]->LockedResources.begin(),
|
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) {
|
for (std::string const& i : this->Properties[index]->LockedResources) {
|
||||||
this->LockedResources.erase(i);
|
this->LockedResources.erase(i);
|
||||||
@@ -603,7 +603,7 @@ void cmCTestMultiProcessHandler::FinishTestProcess(cmCTestRunTest* runner,
|
|||||||
this->TestRunningMap[test] = false;
|
this->TestRunningMap[test] = false;
|
||||||
this->WriteCheckpoint(test);
|
this->WriteCheckpoint(test);
|
||||||
this->DeallocateHardware(test);
|
this->DeallocateHardware(test);
|
||||||
this->DeallocateResources(test);
|
this->UnlockResources(test);
|
||||||
this->RunningCount -= GetProcessorsUsed(test);
|
this->RunningCount -= GetProcessorsUsed(test);
|
||||||
|
|
||||||
for (auto p : properties->Affinity) {
|
for (auto p : properties->Affinity) {
|
||||||
|
@@ -134,8 +134,8 @@ protected:
|
|||||||
bool CheckStopTimePassed();
|
bool CheckStopTimePassed();
|
||||||
void SetStopTimePassed();
|
void SetStopTimePassed();
|
||||||
|
|
||||||
void AllocateResources(int index);
|
void LockResources(int index);
|
||||||
void DeallocateResources(int index);
|
void UnlockResources(int index);
|
||||||
|
|
||||||
bool AllocateHardware(int index);
|
bool AllocateHardware(int index);
|
||||||
bool TryAllocateHardware(
|
bool TryAllocateHardware(
|
||||||
|
Reference in New Issue
Block a user