mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
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:
committed by
Compute-Runtime-Automation
parent
07bb2e7b0b
commit
2d151ec0fe
33
shared/source/os_interface/os_interface.cpp
Normal file
33
shared/source/os_interface/os_interface.cpp
Normal 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
|
||||
Reference in New Issue
Block a user