diff options
-rw-r--r-- | compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp b/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp index 94db50fc826..0f043caedf3 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp +++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp @@ -1,27 +1,17 @@ #include <sys/types.h> #include <thread> #include <unistd.h> -#include <vector> template <typename T> void launcher(T func) { - std::vector<std::thread> pool; + auto t1 = std::thread(func); + auto t2 = std::thread(func); - for (int i = 0; i < 10; i++) { - pool.emplace_back(std::thread(func)); - } - - for (auto &t : pool) { - t.join(); - } + t1.join(); + t2.join(); } -void h() {} - -void g() { - fork(); - launcher<>(h); -} +void g() {} void f() { fork(); |