| 9 | namespace cpu = strata::kernels::cpu; |
| 10 | |
| 11 | static bool check(bool ok, const char* message) { |
| 12 | if (!ok) std::fprintf(stderr, "Windows affinity test: %s (error %lu)\n", message, (unsigned long) GetLastError()); |
| 13 | return ok; |
| 14 | } |
| 15 | |
| 16 | static bool select(const std::vector<ULONG>& ids) { |
| 17 | return SetThreadSelectedCpuSets(GetCurrentThread(), ids.empty() ? nullptr : ids.data(), (ULONG) ids.size()) != 0; |
no outgoing calls
no test coverage detected