SWDEV-295251 - Remove waitEvent check in append

Change-Id: I994f3e7c67ed29c4ee46229c8bcd1448fc7f59ec


[ROCm/clr commit: de5168fdef]
This commit is contained in:
anusha GodavarthySurya
2021-07-26 14:26:32 -07:00
کامیت شده توسط Maneesh Gupta
والد d46973bdc3
کامیت aae046174c
@@ -221,23 +221,21 @@ void HostQueue::append(Command& command) {
return;
}
if (command.waitingEvent() == nullptr) {
// Set last submitted command
Command* prevLastEnqueueCommand;
command.retain();
{
// lastCmdLock_ ensures that lastEnqueueCommand() can retain the command before it is swapped
// out. We want to keep this critical section as short as possible, so the command should be
// released outside this section.
ScopedLock l(lastCmdLock_);
// Set last submitted command
Command* prevLastEnqueueCommand;
command.retain();
{
// lastCmdLock_ ensures that lastEnqueueCommand() can retain the command before it is swapped
// out. We want to keep this critical section as short as possible, so the command should be
// released outside this section.
ScopedLock l(lastCmdLock_);
prevLastEnqueueCommand = lastEnqueueCommand_;
lastEnqueueCommand_ = &command;
}
prevLastEnqueueCommand = lastEnqueueCommand_;
lastEnqueueCommand_ = &command;
}
if (prevLastEnqueueCommand != nullptr) {
prevLastEnqueueCommand->release();
}
if (prevLastEnqueueCommand != nullptr) {
prevLastEnqueueCommand->release();
}
}