mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
fix: add missing lock in MapOperationsStorage::getInfoForHostPtr
https://github.com/intel/compute-runtime/issues/640 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
21e8595fef
commit
04afb63717
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -105,6 +105,7 @@ MapOperationsHandler *NEO::MapOperationsStorage::getHandlerIfExists(cl_mem memOb
|
||||
}
|
||||
|
||||
bool NEO::MapOperationsStorage::getInfoForHostPtr(const void *ptr, size_t size, MapInfo &outInfo) {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
for (auto &entry : handlers) {
|
||||
if (entry.second.findInfoForHostPtr(ptr, size, outInfo)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user