Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / Shell / Watchpoint / Inputs / thread-dbreg.c
blob14f3474789afded77ce8598e374ed76f680e53b4
1 #include <pthread.h>
3 int g_watchme = 0;
5 void *thread_func(void *arg) {
6 /* watchpoint trigger from subthread */
7 g_watchme = 2;
8 return 0;
11 int main() {
12 pthread_t thread;
13 if (pthread_create(&thread, 0, thread_func, 0))
14 return 1;
16 /* watchpoint trigger from main thread */
17 g_watchme = 1;
19 if (pthread_join(thread, 0))
20 return 2;
22 return 0;