| 387 | } |
| 388 | |
| 389 | EXPORT_C_FUNC XResult XQueueProfileHwCommandCount(XQueueHandle xq, int64_t *count) |
| 390 | { |
| 391 | if (count == nullptr) return kXSchedErrorInvalidValue; |
| 392 | std::shared_ptr<XQueue> xq_shptr = XQueueManager::Get(xq); |
| 393 | if (xq_shptr == nullptr) { |
| 394 | XWARN("XQueue with handle 0x" FMT_64X " does not exist", xq); |
| 395 | return kXSchedErrorNotFound; |
| 396 | } |
| 397 | *count = xq_shptr->GetHwCommandCount(); |
| 398 | return kXSchedSuccess; |
| 399 | } |