Change type to atomic for variables in mock_drm_memory_manager.h

fix for sporadic failure in utl

Change-Id: Icdcdd600e8114f0b73ade4bc5e714b98495645e7
This commit is contained in:
Katarzyna Cencelewska
2018-11-15 15:11:14 +01:00
committed by sys_ocldev
parent bb4cf07737
commit 76b97b4955

View File

@@ -7,12 +7,13 @@
#include "runtime/os_interface/linux/drm_memory_manager.h"
#include "unit_tests/mocks/mock_host_ptr_manager.h"
#include <atomic>
namespace OCLRT {
static off_t lseekReturn = 4096u;
static int lseekCalledCount = 0;
static int mmapMockCallCount = 0;
static int munmapMockCallCount = 0;
static std::atomic<int> lseekCalledCount(0);
static std::atomic<int> mmapMockCallCount(0);
static std::atomic<int> munmapMockCallCount(0);
off_t lseekMock(int fd, off_t offset, int whence) noexcept {
lseekCalledCount++;