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

Method ProcessReady

sched/src/policy/pup.cpp:157–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool ProcessUtilizationPartitionPolicy::ProcessReady(PID pid, const Status &status)
158{
159 const auto it = status.process_status.find(pid);
160 XASSERT(it != status.process_status.end(), "process " FMT_PID " not found", pid);
161
162 // if one xqueue is ready, the process is ready
163 for (auto xq: it->second->running_xqueues) {
164 const auto xq_it = status.xqueue_status.find(xq);
165 if (xq_it == status.xqueue_status.end()) continue;
166 if (xq_it->second->ready) return true;
167 }
168 for (auto xq: it->second->suspended_xqueues) {
169 const auto xq_it = status.xqueue_status.find(xq);
170 if (xq_it == status.xqueue_status.end()) continue;
171 if (xq_it->second->ready) return true;
172 }
173 return false;
174}
175
176void ProcessUtilizationPartitionPolicy::SwitchProcess(PID pid, const Status &status)
177{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected