Lines Matching refs:barriers
39 * can now place barriers and wait for the other end to reach a random or
42 * barrier or the last barrier that you placed. This way, you can use barriers
43 * for one-way *and* full synchronization. Note that even-though barriers are
46 * possible to address barriers by their ID.
48 * Barrier-API: Both ends can place as many barriers via barrier_place() as
49 * they want and each pair of barriers on both sides will be implicitly linked.
52 * other side calls barrier_place(). No links between the barriers are
56 * barriers that are linked to a barrier we already placed. If the other side
57 * already placed more barriers than we did, barrier_sync_next() returns
60 * placed as many barriers via barrier_place() as we did. If they already placed
63 * Additionally to basic barriers, an abortion event is available.
65 * immediately cancels all placed barriers and replaces them. Any running and
78 * table. If that's given, barriers provide target tracking: If the remote side
87 * more barriers than the remote side).
150 b->barriers = 0;
165 * are done. If this is not done, barriers will not work correctly.
167 * Note that barriers could be supported without fork() or clone(). However,
209 b->barriers = BARRIER_WE_ABORTED;
211 b->barriers = BARRIER_I_ABORTED;
213 b->barriers += buf;
224 b->barriers = BARRIER_WE_ABORTED;
228 /* waits for barriers; returns false if they aborted, otherwise true */
233 while (b->barriers > comp) {
263 * barriers. */
271 b->barriers = BARRIER_WE_ABORTED;
273 b->barriers = BARRIER_THEY_ABORTED;
275 b->barriers -= buf;
287 b->barriers = BARRIER_WE_ABORTED;
318 * abortion. Any following attempt to place normal barriers or to wait on normal
319 * barriers will return immediately as "false".
350 barrier_read(b, b->barriers - 1);
377 * barrier_place(). However, this only waits for linked barriers. That means, if
378 * the other side already placed more barriers than (or as much as) we did, this
391 barrier_read(b, MAX((int64_t)0, b->barriers - 1));
396 * barrier_sync() - Wait for the other side to place as many barriers as we did