| 2170 | } |
| 2171 | |
| 2172 | Sim2(bool printSimTime) |
| 2173 | : time(0.0), timerTime(0.0), currentTaskID(TaskPriority::Zero), taskCount(0), yielded(false), yield_limit(0), |
| 2174 | printSimTime(printSimTime) { |
| 2175 | // Not letting currentProcess be nullptr eliminates some annoying special cases |
| 2176 | currentProcess = |
| 2177 | new ProcessInfo("NoMachine", |
| 2178 | LocalityData(Optional<Standalone<StringRef>>(), StringRef(), StringRef(), StringRef()), |
| 2179 | ProcessClass(), |
| 2180 | { NetworkAddress() }, |
| 2181 | this, |
| 2182 | "", |
| 2183 | ""); |
| 2184 | // create a key pair for AuthZ testing |
| 2185 | auto key = mkcert::makeEcP256(); |
| 2186 | authKeys.insert(std::make_pair(Standalone<StringRef>("DefaultKey"_sr), key)); |
| 2187 | g_network = net2 = newNet2(TLSConfig(), false, true); |
| 2188 | g_network->addStopCallback(Net2FileSystem::stop); |
| 2189 | Net2FileSystem::newFileSystem(); |
| 2190 | check_yield(TaskPriority::Zero); |
| 2191 | } |
| 2192 | |
| 2193 | // Implementation |
| 2194 | struct Task { |
nothing calls this directly
no test coverage detected