mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 20:39:56 +08:00
Disable copying Linux OS sysman class
Update the Linux os class not allow copying by usage of NEO::NonCopyableClass. Change-Id: Icc0d40eaa83d7a46ec0d48a5fc9deb5c57c0e3f8 Signed-off-by: macabral <matias.a.cabral@intel.com>
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
set(L0_SRCS_TOOLS_SYSMAN_LINUX
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_sysman_imp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_sysman_imp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/os_sysman_imp.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/os_sysman_imp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fs_access.cpp)
|
||||
|
||||
if(UNIX)
|
||||
@@ -17,5 +17,7 @@ target_sources(${L0_STATIC_LIB_NAME}
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
# Make our source files visible to parent
|
||||
set_property(GLOBAL PROPERTY L0_SRCS_TOOLS_SYSMAN_LINUX ${L0_SRCS_TOOLS_SYSMAN_LINUX})
|
||||
|
||||
@@ -56,12 +56,15 @@ LinuxSysmanImp::LinuxSysmanImp(SysmanImp *pParentSysmanImp) {
|
||||
LinuxSysmanImp::~LinuxSysmanImp() {
|
||||
if (nullptr != pSysfsAccess) {
|
||||
delete pSysfsAccess;
|
||||
pSysfsAccess = nullptr;
|
||||
}
|
||||
if (nullptr != pProcfsAccess) {
|
||||
delete pProcfsAccess;
|
||||
pProcfsAccess = nullptr;
|
||||
}
|
||||
if (nullptr != pFsAccess) {
|
||||
delete pFsAccess;
|
||||
pFsAccess = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/os_interface.h"
|
||||
|
||||
@@ -14,15 +15,11 @@
|
||||
|
||||
namespace L0 {
|
||||
|
||||
class LinuxSysmanImp : public OsSysman {
|
||||
class LinuxSysmanImp : public OsSysman, public NEO::NonCopyableClass {
|
||||
public:
|
||||
LinuxSysmanImp(SysmanImp *pParentSysmanImp);
|
||||
~LinuxSysmanImp() override;
|
||||
|
||||
// Don't allow copies of the LinuxSysmanImp object
|
||||
LinuxSysmanImp(const LinuxSysmanImp &obj) = delete;
|
||||
LinuxSysmanImp &operator=(const LinuxSysmanImp &obj) = delete;
|
||||
|
||||
ze_result_t init() override;
|
||||
|
||||
FsAccess &getFsAccess();
|
||||
|
||||
Reference in New Issue
Block a user