1 #include "pseudo_barrier.h"
5 volatile uint32_t g_val
= 0;
6 pseudo_barrier_t g_barrier
, g_barrier2
;
9 pseudo_barrier_wait(g_barrier
);
10 pseudo_barrier_wait(g_barrier2
);
11 printf("%s starting...\n", __FUNCTION__
);
12 for (uint32_t i
= 0; i
< 10; ++i
)
16 int main(int argc
, char const *argv
[]) {
17 printf("Before running the thread\n");
18 pseudo_barrier_init(g_barrier
, 2);
19 pseudo_barrier_init(g_barrier2
, 2);
20 std::thread
thread(thread_func
);
22 printf("After launching the thread\n");
23 pseudo_barrier_wait(g_barrier
);
25 printf("After running the thread\n");
26 pseudo_barrier_wait(g_barrier2
);