MCPcopy Create free account
hub / github.com/XpuOS/xsched / XQueueSubmit

Function XQueueSubmit

preempt/src/xqueue/xqueue.cpp:311–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311EXPORT_C_FUNC XResult XQueueSubmit(XQueueHandle xq, HwCommandHandle hw_cmd)
312{
313 std::shared_ptr<XQueue> xq_shptr = XQueueManager::Get(xq);
314 if (xq_shptr == nullptr) {
315 XWARN("XQueue with handle 0x" FMT_64X " does not exist", xq);
316 return kXSchedErrorNotFound;
317 }
318 // Get and DELETE the HwCommand from the HwCommandManager.
319 std::shared_ptr<HwCommand> hw_cmd_shptr = HwCommandManager::Del(hw_cmd);
320 if (hw_cmd_shptr == nullptr) {
321 XWARN("HwCommand with handle 0x" FMT_64X " does not exist or not registered", hw_cmd);
322 return kXSchedErrorNotFound;
323 }
324 xq_shptr->Submit(hw_cmd_shptr);
325 return kXSchedSuccess;
326}
327
328EXPORT_C_FUNC XResult XQueueWait(XQueueHandle xq, HwCommandHandle hw_cmd)
329{

Callers 2

runFunction · 0.85
RunMethod · 0.85

Calls 1

SubmitMethod · 0.80

Tested by 1

RunMethod · 0.68