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

Method Wait

preempt/src/xqueue/async_xqueue.cpp:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void AsyncXQueue::Wait(std::shared_ptr<HwCommand> hw_cmd)
65{
66 if (!hw_cmd->Synchronizable()) {
67 // If it is not synchronizable, it can only be synced
68 // by waiting its state turns to kCommandStateCompleted.
69 hw_cmd->WaitUntil(kCommandStateCompleted);
70 return;
71 }
72
73 // Check if it is already completed.
74 if (hw_cmd->GetState() >= kCommandStateCompleted) return;
75
76 // If this HwCommand is synchronizable, then use launch worker to sync it.
77 hw_cmd->WaitUntil(kCommandStateInFlight);
78 launch_worker_->SyncCmd(hw_cmd);
79}
80
81XQueueState AsyncXQueue::Query()
82{

Callers 5

AsyncXQueueMethod · 0.45
~AsyncXQueueMethod · 0.45
WaitAllMethod · 0.45
ForEachWaitAllMethod · 0.45
XQueueWaitFunction · 0.45

Calls 4

WaitUntilMethod · 0.80
GetStateMethod · 0.80
SyncCmdMethod · 0.80
SynchronizableMethod · 0.45

Tested by

no test coverage detected