Move returned last command under the lock

Change-Id: I4a2b29a6beacd56ea38d91a33b3c5f8b763be3c7


[ROCm/clr commit: 88bd851f72]
Esse commit está contido em:
German Andryeyev committed 2020-12-11 15:19:06 -05:00
1 pai 5bb213cc2b
commit 696876f6bb
1 file changed
+2 -2
+2 -2
Ver Arquivo
@@ -234,6 +234,7 @@ Command* HostQueue::getLastQueuedCommand(bool retain) {
if (retain && lastEnqueueCommand_ != nullptr) {
lastEnqueueCommand_->retain();
}
return lastEnqueueCommand_;
} else {
// Get last submitted command
ScopedLock l(lastCmdLock_);
@@ -243,9 +244,8 @@ Command* HostQueue::getLastQueuedCommand(bool retain) {
if (retain && lastEnqueueCommand_ != nullptr) {
lastEnqueueCommand_->retain();
}
return lastEnqueueCommand_;
}
return lastEnqueueCommand_;
}
DeviceQueue::~DeviceQueue() {