Move Drm cleanup logic to separated method

Related-To: NEO-6999
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-07-19 17:13:51 +00:00
committed by Compute-Runtime-Automation
parent 07bb2e7b0b
commit 2d151ec0fe
14 changed files with 69 additions and 32 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/os_interface.h"
namespace NEO {
OSInterface::~OSInterface() {
if (this->driverModel) {
this->driverModel->cleanup();
}
}
DriverModel *OSInterface::getDriverModel() const {
return this->driverModel.get();
};
void OSInterface::setDriverModel(std::unique_ptr<DriverModel> driverModel) {
this->driverModel = std::move(driverModel);
};
bool OSInterface::are64kbPagesEnabled() {
return osEnabled64kbPages;
}
static_assert(!std::is_move_constructible_v<OSInterface>);
static_assert(!std::is_copy_constructible_v<OSInterface>);
static_assert(!std::is_move_assignable_v<OSInterface>);
static_assert(!std::is_copy_assignable_v<OSInterface>);
} // namespace NEO