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

Method ForEachWaitAll

preempt/src/xqueue/xqueue.cpp:89–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89XResult XQueueManager::ForEachWaitAll()
90{
91 std::list<std::shared_ptr<XQueueWaitAllCommand>> wait_cmds;
92 std::unique_lock<std::mutex> lock(mtx_);
93 for (auto it : xqs_) {
94 auto wait_cmd = it.second->SubmitWaitAll();
95 if (wait_cmd == nullptr) return kXSchedErrorUnknown;
96 wait_cmds.push_back(wait_cmd);
97 }
98 lock.unlock();
99 for (auto &cmd : wait_cmds) cmd->Wait();
100 return kXSchedSuccess;
101}
102
103XResult XQueueManager::ForEach(std::function<XResult(std::shared_ptr<XQueue>)> func)
104{

Callers

nothing calls this directly

Calls 3

SubmitWaitAllMethod · 0.80
unlockMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected