| 260 | } |
| 261 | |
| 262 | ze_result_t XEventHostSynchronize(ze_event_handle_t hEvent, uint64_t timeout) |
| 263 | { |
| 264 | ze_command_list_handle_t cmdlist = g_event_to_cmdlist.Get(hEvent, nullptr); |
| 265 | std::shared_ptr<HwCommand> cmd; |
| 266 | if (cmdlist == nullptr) |
| 267 | cmd = g_event_to_cmd.Get(hEvent, nullptr); |
| 268 | else |
| 269 | cmd = g_cmdlist_to_cmd.Get(cmdlist, nullptr); |
| 270 | if (cmd == nullptr) return Driver::EventHostSynchronize(hEvent, timeout); |
| 271 | cmd->Wait(); |
| 272 | return ZE_RESULT_SUCCESS; |
| 273 | } |
| 274 | |
| 275 | ze_result_t XEventQueryStatus(ze_event_handle_t hEvent) |
| 276 | { |