Merge "hipStreamAddCallback test seg faults" into amd-master-next

이 커밋은 다음에 포함됨:
Christophe Paquot 작성하고 Gerrit Code Review가 2020-03-20 12:05:37 -04:00를 커밋함
커밋 446c8685e2
1 파일이 변경됨
+5
+5
파일 보기
@@ -251,6 +251,11 @@ hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback
amd::HostQueue* hostQueue = reinterpret_cast<hip::Stream*>
(stream)->asHostQueue();
amd::Command* command = hostQueue->getLastQueuedCommand(true);
if (command == nullptr) {
amd::Command::EventWaitList eventWaitList;
command = new amd::Marker(*hostQueue, false, eventWaitList);
command->enqueue();
}
amd::Event& event = command->event();
StreamCallback* cbo = new StreamCallback(stream, callback, userData, command);