Fix threading issue in mt_tests

Resolves: NEO-5165

Change-Id: I1258cff22541c395c74c999fc7dd45be5e430dd1
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-11-02 13:22:26 +01:00
committed by sys_ocldev
parent 80076a808c
commit e34c44b425
2 changed files with 11 additions and 2 deletions

View File

@@ -94,5 +94,11 @@ class TestedDrmMemoryManager : public MemoryManagerCreate<DrmMemoryManager> {
DrmAllocation *allocate32BitGraphicsMemory(uint32_t rootDeviceIndex, size_t size, const void *ptr, GraphicsAllocation::AllocationType allocationType);
~TestedDrmMemoryManager() override;
size_t peekSharedBosSize() {
size_t size = 0;
std::unique_lock<std::mutex> lock(mtx);
size = sharingBufferObjects.size();
return size;
}
};
} // namespace NEO