| 152 | } |
| 153 | |
| 154 | void HostQueue::finishCommand(Command* command) { |
| 155 | if (command == nullptr) { |
| 156 | command = getLastQueuedCommand(true); |
| 157 | if (command != nullptr) { |
| 158 | ClPrint(LOG_DETAIL_DEBUG, LOG_CMD, "No command, awaiting complete status on host"); |
| 159 | command->awaitCompletion(); |
| 160 | command->release(); |
| 161 | } |
| 162 | return; |
| 163 | } |
| 164 | // Check hardware event status for the specific command |
| 165 | static constexpr bool kWaitCompletion = true; |
| 166 | if (!device().IsHwEventReady(command->event(), kWaitCompletion)) { |
| 167 | ClPrint(LOG_DETAIL_DEBUG, LOG_CMD, "No HW event, awaiting complete status on host"); |
| 168 | command->awaitCompletion(); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | void HostQueue::finish(bool cpu_wait) { |
| 173 | Command* command = nullptr; |
no test coverage detected