| 155 | } |
| 156 | |
| 157 | bool 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 | |
| 176 | void ProcessUtilizationPartitionPolicy::SwitchProcess(PID pid, const Status &status) |
| 177 | { |
nothing calls this directly
no outgoing calls
no test coverage detected