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

Method ForEachCommand

preempt/src/xqueue/command_buffer.cpp:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void CommandBuffer::ForEachCommand(std::function<bool (std::shared_ptr<XCommand>)> func)
29{
30 std::lock_guard<std::mutex> lock(mtx_);
31 if (last_dequeued_cmd_ != nullptr && last_dequeued_cmd_->GetState() < kCommandStateCompleted) {
32 func(last_dequeued_cmd_);
33 }
34 for (auto xcmd : cmds_) {
35 if (!func(xcmd)) break;
36 }
37}
38
39std::shared_ptr<XCommand> CommandBuffer::Dequeue()
40{

Callers

nothing calls this directly

Calls 1

GetStateMethod · 0.80

Tested by

no test coverage detected