[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / packages / Python / lldbsuite / test / make / pseudo_barrier.h
blobe4066b72e02ef84cba98f10fc0eacb79be2e4438
1 #include <atomic>
3 // Note that although hogging the CPU while waiting for a variable to change
4 // would be terrible in production code, it's great for testing since it avoids
5 // a lot of messy context switching to get multiple threads synchronized.
7 typedef std::atomic<int> pseudo_barrier_t;
9 #define pseudo_barrier_wait(barrier) \
10 do \
11 { \
12 --(barrier); \
13 while ((barrier).load() > 0) \
14 ; \
15 } while (0)
17 #define pseudo_barrier_init(barrier, count) \
18 do \
19 { \
20 (barrier) = (count); \
21 } while (0)