fix: Avoiding races when modifying queue and Tag data

Related-To: NEO-8196
Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
This commit is contained in:
Andrzej Koska 2023-10-23 11:59:45 +00:00 committed by Compute-Runtime-Automation
parent 7e7eea9995
commit c4a24d8f31
2 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,7 @@ bool CommandQueueHw<Family>::waitForTimestamps(Range<CopyEngineState> copyEngine
bool waited = false;
if (isWaitForTimestampsEnabled()) {
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);
waited = waitForTimestampsWithinContainer<TSPacketType>(mainContainer, getGpgpuCommandStreamReceiver(), status);
if (waited) {

View File

@ -15,6 +15,7 @@ template <typename TagType>
TagAllocator<TagType>::TagAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, MemoryManager *memMngr, size_t tagCount, size_t tagAlignment,
size_t tagSize, bool doNotReleaseNodes, DeviceBitfield deviceBitfield)
: TagAllocatorBase(rootDeviceIndices, memMngr, tagCount, tagAlignment, tagSize, doNotReleaseNodes, deviceBitfield) {
std::unique_lock<std::mutex> lock(allocatorMutex);
populateFreeTags();
}