refactor: limit lock scope to avoid potential deadlock
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
0f161c1f19
commit
42481de5d0
|
@ -458,12 +458,14 @@ inline WaitStatus Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||||
|
|
||||||
DEBUG_BREAK_IF(this->taskLevel == CompletionStamp::notReady && this->executionStatus >= 0);
|
DEBUG_BREAK_IF(this->taskLevel == CompletionStamp::notReady && this->executionStatus >= 0);
|
||||||
|
|
||||||
|
{
|
||||||
TakeOwnershipWrapper<CommandQueue> queueOwnership(*cmdQueue);
|
TakeOwnershipWrapper<CommandQueue> queueOwnership(*cmdQueue);
|
||||||
|
|
||||||
bool checkQueueCompletionForPostSyncOperations = !(waitedOnTimestamps && !cmdQueue->isOOQEnabled() &&
|
bool checkQueueCompletionForPostSyncOperations = !(waitedOnTimestamps && !cmdQueue->isOOQEnabled() &&
|
||||||
(this->timestampPacketContainer->peekNodes() == cmdQueue->getTimestampPacketContainer()->peekNodes()));
|
(this->timestampPacketContainer->peekNodes() == cmdQueue->getTimestampPacketContainer()->peekNodes()));
|
||||||
|
|
||||||
cmdQueue->handlePostCompletionOperations(checkQueueCompletionForPostSyncOperations);
|
cmdQueue->handlePostCompletionOperations(checkQueueCompletionForPostSyncOperations);
|
||||||
|
}
|
||||||
|
|
||||||
auto *allocationStorage = cmdQueue->getGpgpuCommandStreamReceiver().getInternalAllocationStorage();
|
auto *allocationStorage = cmdQueue->getGpgpuCommandStreamReceiver().getInternalAllocationStorage();
|
||||||
allocationStorage->cleanAllocationList(this->taskCount, TEMPORARY_ALLOCATION);
|
allocationStorage->cleanAllocationList(this->taskCount, TEMPORARY_ALLOCATION);
|
||||||
|
|
Loading…
Reference in New Issue