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

这个提交包含在:
Christophe Paquot 编写, Gerrit Code Review 于 2020-03-20 12:05:37 -04:00 提交
2 父节点 334a1f8770 31df9b358d
当前提交 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);