Lines Matching defs:barrier
17 #include "barrier.h"
30 CheckWaitTask(Barrier* barrier, AtomicInteger* count1, AtomicInteger* count2)
31 : barrier_(barrier),
36 LOG(INFO) << "Before barrier" << *self;
40 LOG(INFO) << "After barrier" << *self;
60 // Check that barrier wait and barrier increment work.
64 Barrier barrier(num_threads + 1); // One extra Wait() in main thread.
69 thread_pool.AddTask(self, new CheckWaitTask(&barrier, &count1, &count2));
75 // Count 2 should still be zero since no thread should have gone past the barrier.
78 barrier.Wait(self);
89 CheckPassTask(Barrier* barrier, AtomicInteger* count, size_t subtasks)
90 : barrier_(barrier),
111 // Check that barrier pass through works.
115 Barrier barrier(0);
120 thread_pool.AddTask(self, new CheckPassTask(&barrier, &count, num_sub_tasks));
124 // Wait for all the tasks to complete using the barrier.
125 barrier.Increment(self, expected_total_tasks);