Move returned last command under the lock
Change-Id: I4a2b29a6beacd56ea38d91a33b3c5f8b763be3c7
Bu işleme şunda yer alıyor:
@@ -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() {
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle