Merge "Wake up commandQueue before returning" into amd-master-next

Dieser Commit ist enthalten in:
Saleel Kudchadker
2020-04-03 18:27:03 -04:00
committet von Gerrit Code Review
Commit 74dc32537e
+10 -2
Datei anzeigen
@@ -95,12 +95,20 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
}
hipError_t Event::streamWait(amd::HostQueue* hostQueue, uint flags) {
if ((event_ == nullptr) || (event_->command().queue() == hostQueue)) {
// Effective no-op if event is NULL
if (event_ == nullptr) {
return hipSuccess;
}
amd::ScopedLock lock(lock_);
bool retain = false;
if (event_->command().queue() == hostQueue) {
// Wake up commandQueue thread
if (!event_->notifyCmdQueue()) {
return hipErrorLaunchOutOfResources;
}
return hipSuccess;
}
if (!event_->notifyCmdQueue()) {
return hipErrorLaunchOutOfResources;