[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / packages / Python / lldbsuite / test / commands / process / attach-resume / main.cpp
blob82aad70eed560213aa48369b94a6dd0e9c59fd83
1 #include <stdio.h>
2 #include <fcntl.h>
4 #include <chrono>
5 #include <thread>
7 volatile bool debugger_flag = true; // The debugger will flip this to false
9 void *start(void *data)
11 int i;
12 size_t idx = (size_t)data;
13 for (i=0; i<30; i++)
15 if ( idx == 0 && debugger_flag)
16 std::this_thread::sleep_for(std::chrono::microseconds(1)); // Set breakpoint here
17 std::this_thread::sleep_for(std::chrono::seconds(1));
19 return 0;
22 int main(int argc, char const *argv[])
24 lldb_enable_attach();
26 static const size_t nthreads = 16;
27 std::thread threads[nthreads];
28 size_t i;
30 for (i=0; i<nthreads; i++)
31 threads[i] = std::move(std::thread(start, (void*)i));
33 for (i=0; i<nthreads; i++)
34 threads[i].join();