Files
compute-runtime/shared/test/common/mocks/linux/mock_os_context_linux.h
Mateusz Hoppe 7d82b690e4 fix(debugger): use per-context fences for vm_bind operations
- vm_bind with user fence updates fence value independently for every
VM hence with per-context VMs, every context needs its unique fence
address. This prevents 2 contexts from updating value possibly
writing lower value than the one that was already stored

Resolves: NEO-8004

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-05-24 15:17:31 +02:00

23 lines
648 B
C++

/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/os_interface/linux/os_context_linux.h"
namespace NEO {
class MockOsContextLinux : public OsContextLinux {
public:
using OsContextLinux::drmContextIds;
using OsContextLinux::fenceVal;
using OsContextLinux::pagingFence;
MockOsContextLinux(Drm &drm, uint32_t rootDeviceIndex, uint32_t contextId, const EngineDescriptor &engineDescriptor)
: OsContextLinux(drm, rootDeviceIndex, contextId, engineDescriptor) {}
};
static_assert(sizeof(OsContextLinux) == sizeof(MockOsContextLinux));
} // namespace NEO