userland: move more multithreading from cpp-cheat!

Convert infinite_loop.c into loop.c. Keep all examples fast by default!
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-09-07 00:00:03 +00:00
parent 986d6cfb7b
commit e0fb39c92a
8 changed files with 165 additions and 14 deletions

View File

@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
if (argc > 2) {
niters = std::stoull(argv[2], NULL, 0);
} else {
niters = 10000;
niters = 10;
}
std::vector<std::thread> threads(nthreads);
for (size_t i = 0; i < nthreads; ++i)