Home
last modified time | relevance | path

Searched full:barrier (Results 1 – 25 of 428) sorted by relevance

12345678910>>...18

/freebsd/sys/contrib/ck/src/
H A Dck_barrier_mcs.c34 ck_barrier_mcs_init(struct ck_barrier_mcs *barrier, unsigned int nthr) in ck_barrier_mcs_init() argument
38 ck_pr_store_uint(&barrier->tid, 0); in ck_barrier_mcs_init()
46 barrier[i].havechild[j] = ((i << 2) + j < nthr - 1) ? ~0 : 0; in ck_barrier_mcs_init()
52 barrier[i].childnotready[j] = barrier[i].havechild[j]; in ck_barrier_mcs_init()
56 barrier[i].parent = (i == 0) ? in ck_barrier_mcs_init()
57 &barrier[i].dummy : in ck_barrier_mcs_init()
58 &barrier[(i - 1) >> 2].childnotready[(i - 1) & 3]; in ck_barrier_mcs_init()
61 barrier[i].children[0] = ((i << 1) + 1 >= nthr) ? in ck_barrier_mcs_init()
62 &barrier[i].dummy : in ck_barrier_mcs_init()
63 &barrier[(i << 1) + 1].parentsense; in ck_barrier_mcs_init()
[all …]
H A Dck_barrier_dissemination.c36 ck_barrier_dissemination_init(struct ck_barrier_dissemination *barrier, in ck_barrier_dissemination_init() argument
43 barrier->nthr = nthr; in ck_barrier_dissemination_init()
44 barrier->size = size = ck_internal_log(ck_internal_power_2(nthr)); in ck_barrier_dissemination_init()
45 ck_pr_store_uint(&barrier->tid, 0); in ck_barrier_dissemination_init()
48 barrier[i].flags[0] = barrier_internal[i]; in ck_barrier_dissemination_init()
49 barrier[i].flags[1] = barrier_internal[i] + size; in ck_barrier_dissemination_init()
56 * Partners are chosen such that by the completion of the barrier, in ck_barrier_dissemination_init()
59 * by every other thread in the barrier. in ck_barrier_dissemination_init()
67 barrier[i].flags[0][k].pflag = &barrier[j].flags[0][k].tflag; in ck_barrier_dissemination_init()
68 barrier[i].flags[1][k].pflag = &barrier[j].flags[1][k].tflag; in ck_barrier_dissemination_init()
[all …]
H A Dck_barrier_tournament.c34 * This is a tournament barrier implementation. Threads are statically
35 * assigned roles to perform for each round of the barrier. Winners
50 ck_barrier_tournament_subscribe(struct ck_barrier_tournament *barrier, in ck_barrier_tournament_subscribe() argument
55 state->vpid = ck_pr_faa_uint(&barrier->tid, 1); in ck_barrier_tournament_subscribe()
60 ck_barrier_tournament_init(struct ck_barrier_tournament *barrier, in ck_barrier_tournament_init() argument
66 ck_pr_store_uint(&barrier->tid, 0); in ck_barrier_tournament_init()
67 barrier->size = size = ck_barrier_tournament_size(nthr); in ck_barrier_tournament_init()
97 ck_pr_store_ptr(&barrier->rounds, rounds); in ck_barrier_tournament_init()
109 ck_barrier_tournament(struct ck_barrier_tournament *barrier, in ck_barrier_tournament() argument
112 struct ck_barrier_tournament_round **rounds = ck_pr_load_ptr(&barrier->rounds); in ck_barrier_tournament()
[all …]
H A Dck_barrier_combining.c63 * barrier may end prematurely. in ck_barrier_combining_insert()
72 * into the barrier's tree. We use a queue to implement this
158 ck_barrier_combining_aux(struct ck_barrier_combining *barrier, in ck_barrier_combining_aux() argument
169 * If we are and will be the last thread entering the barrier for the in ck_barrier_combining_aux()
173 ck_barrier_combining_aux(barrier, tnode->parent, sense); in ck_barrier_combining_aux()
179 * number of threads are members of a barrier for the lifetime of the barrier. in ck_barrier_combining_aux()
182 * are at the barrier. in ck_barrier_combining_aux()
197 ck_barrier_combining(struct ck_barrier_combining *barrier, in ck_barrier_combining() argument
202 ck_barrier_combining_aux(barrier, tnode, state->sense); in ck_barrier_combining()
204 /* Reverse the execution context's sense for the next barrier. */ in ck_barrier_combining()
H A Dck_barrier_centralized.c32 ck_barrier_centralized(struct ck_barrier_centralized *barrier, in ck_barrier_centralized() argument
40 * This sense is reversed when the barrier is entered. Every in ck_barrier_centralized()
45 value = ck_pr_faa_uint(&barrier->value, 1); in ck_barrier_centralized()
47 ck_pr_store_uint(&barrier->value, 0); in ck_barrier_centralized()
49 ck_pr_store_uint(&barrier->sense, sense); in ck_barrier_centralized()
54 while (sense != ck_pr_load_uint(&barrier->sense)) in ck_barrier_centralized()
/freebsd/contrib/llvm-project/libcxx/include/
H A Dbarrier14 barrier synopsis
20 class barrier
27 constexpr explicit barrier(ptrdiff_t phase_count,
29 ~barrier();
31 barrier(const barrier&) = delete;
32 barrier& operator=(const barrier&) = delete;
83 The default implementation of __barrier_base is a classic tree barrier.
86 1. Threads that call into std::barrier functions do not provide indices,
87 so a numbering step is added before the actual barrier algorithm,
88 appearing as an N+1 round to the N rounds of the tree barrier.
[all …]
/freebsd/lib/libthr/thread/
H A Dthr_barrier.c45 _pthread_barrier_destroy(pthread_barrier_t *barrier) in _pthread_barrier_destroy() argument
51 if (barrier == NULL || *barrier == NULL) in _pthread_barrier_destroy()
54 if (*barrier == THR_PSHARED_PTR) { in _pthread_barrier_destroy()
55 bar = __thr_pshared_offpage(barrier, 0); in _pthread_barrier_destroy()
57 *barrier = NULL; in _pthread_barrier_destroy()
62 bar = *barrier; in _pthread_barrier_destroy()
87 *barrier = NULL; in _pthread_barrier_destroy()
89 __thr_pshared_destroy(barrier); in _pthread_barrier_destroy()
96 _pthread_barrier_init(pthread_barrier_t * __restrict barrier, in _pthread_barrier_init() argument
102 if (barrier == NULL || count == 0 || count > INT_MAX) in _pthread_barrier_init()
[all …]
/freebsd/share/man/man3/
H A Dpthread_barrier_destroy.330 .Nd "destroy, initialize or wait on a barrier object"
36 .Fn pthread_barrier_destroy "pthread_barrier_t *barrier"
38 .Fn pthread_barrier_init "pthread_barrier_t *restrict barrier" "const pthread_barrierattr_t *attr" …
40 .Fn pthread_barrier_wait "pthread_barrier_t *barrier"
45 .Fa barrier
59 .Fa barrier
65 .Fa barrier .
74 Once the threads have been released the barrier will be reset.
81 always be returned by the last thread to reach the barrier.
106 .Fa barrier
[all …]
H A Dpthread_barrierattr.331 .Nd "manipulate a barrier attribute object"
77 The barrier object it is attached to may only be accessed by
80 The barrier object it is attached to may be accessed by
108 Insufficient memory to initialize the barrier attribute object
/freebsd/contrib/ofed/include/
H A Dudma_barrier.h52 OK for the DMA device to also not see the write after the barrier.
78 NOTE: x86 has historically used a weaker semantic for this barrier, and
112 #error No architecture specific memory barrier defines found!
120 This guarantees that all reads that follow the barrier see the ordered
150 #error No architecture specific memory barrier defines found!
154 the barrier without also seeing all writes before the barrier. This does
158 data, this barrier is placed after writing the data but before writing the
162 Compared to udma_to_device_barrier() this barrier is not required to fence
175 This should be used after a write to WC memory. This is both a barrier
184 This must also act as a barrier that prevents write combining, eg
[all …]
/freebsd/contrib/netbsd-tests/lib/libpthread/
H A Dt_barrier.c44 pthread_barrier_t barrier; variable
55 printf("thread %d entering barrier\n", which); in threadfunc()
56 rv = pthread_barrier_wait(&barrier); in threadfunc()
57 printf("thread %d leaving barrier -> %d\n", which, rv); in threadfunc()
68 ATF_TC(barrier);
69 ATF_TC_HEAD(barrier, tc) in ATF_TC_HEAD() argument
73 ATF_TC_BODY(barrier, tc) in ATF_TC_BODY() argument
80 PTHREAD_REQUIRE(pthread_barrier_init(&barrier, NULL, COUNT)); in ATF_TC_BODY()
107 ATF_TP_ADD_TC(tp, barrier); in ATF_TP_ADD_TCS()
/freebsd/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_itt.inl120 Note: Thread waiting at join barrier (after __kmp_itt_region_finished) can
165 buff = __kmp_str_format("%s$omp$barrier@%s:%d", str_loc.func,
229 } else { // called for barrier reporting
243 __kmp_str_format("%s$omp$barrier-imbalance:%d@%s:%d", str_loc.func,
246 buff = __kmp_str_format("%s$omp$barrier@%s:%d", str_loc.func,
392 A barrier consists of two phases:
406 would return itt sync object for the next barrier!
409 does not have barrier object or barrier data structure. Barrier i
[all...]
H A Dkmp_barrier.cpp19 // for distributed barrier
42 // ---------------------------- Barrier Algorithms ----------------------------
43 // Distributed barrier
126 // This function is to resize the barrier arrays when the new number of threads
181 // This function inits/re-inits the distributed barrier for a particular number
246 ("__kmp_dist_barrier_gather: T#%d(%d:%d) enter; barrier type %d\n", in __kmp_dist_barrier_gather()
250 // Barrier imbalance - save arrive time to the thread in __kmp_dist_barrier_gather()
313 // indicate it has reached the barrier in __kmp_dist_barrier_gather()
364 // indicate it has reached the barrier in __kmp_dist_barrier_gather()
371 ("__kmp_dist_barrier_gather: T#%d(%d:%d) exit for barrier type %d\n", in __kmp_dist_barrier_gather()
[all …]
H A Dkmp_dispatch_hier.h189 * In the barrier implementations, num_active is the number of threads that are
191 * bdata is the shared barrier data that resides on the kmp_hier_top_unit_t
195 * The reset_shared() method is used to initialize the barrier data on the
198 * The reset_private() method is used to initialize the barrier data on the
201 * The barrier() method takes an id, which is that thread's id for the
202 * kmp_hier_top_unit_t structure, and implements the barrier. All threads wait
203 * inside barrier() until all fellow threads who are attached to that
207 // Core barrier implementation
246 static void barrier(kmp_int32 id, kmp_hier_shared_bdata_t<T> *bdata,
264 void core_barrier_impl<T>::barrier(kmp_int32 id, in barrier() function
[all …]
/freebsd/contrib/opencsd/decoder/source/i_dec/
H A Dtrc_i_decode.cpp75 arm_barrier_t barrier; in DecodeA32() local
99 else if((barrier = inst_ARM_barrier(instr_info->opcode)) != ARM_BARRIER_NONE) in DecodeA32()
101 switch(barrier) in DecodeA32()
129 arm_barrier_t barrier; in DecodeA64() local
146 else if((barrier = inst_A64_barrier(instr_info->opcode)) != ARM_BARRIER_NONE) in DecodeA64()
148 switch(barrier) in DecodeA64()
180 arm_barrier_t barrier; in DecodeT32() local
208 else if((barrier = inst_Thumb_barrier(instr_info->opcode)) != ARM_BARRIER_NONE) in DecodeT32()
210 switch(barrier) in DecodeT32()
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/aarch64/
H A Dlse.S67 #define BARRIER macro
74 #define BARRIER macro
81 #define BARRIER macro
88 #define BARRIER macro
104 #define BARRIER dmb ish macro
164 BARRIER
193 BARRIER
215 BARRIER
260 BARRIER
/freebsd/sys/contrib/openzfs/module/zstd/
H A Dzfs_zstd.c158 kmutex_t barrier; member
173 kmutex_t barrier; member
296 if (pool->mem && mutex_tryenter(&pool->barrier)) { in zstd_mempool_reap()
306 mutex_exit(&pool->barrier); in zstd_mempool_reap()
347 if (mutex_tryenter(&pool->barrier)) { in zstd_mempool_alloc()
358 mutex_exit(&pool->barrier); in zstd_mempool_alloc()
372 if (mutex_tryenter(&pool->barrier)) { in zstd_mempool_alloc()
396 mutex_exit(&pool->barrier); in zstd_mempool_alloc()
416 /* Mark object as released by releasing the barrier mutex */
420 mutex_exit(&z->pool->barrier); in zstd_mempool_free()
[all …]
/freebsd/lib/libsys/
H A Dmembarrier.234 .Nd memory barrier
44 system call provides a memory barrier, ensuring ordering between memory
56 Issue a memory barrier for all threads from all processes.
61 Execute a memory barrier on all running threads of all processes registered
69 Execute a memory barrier on each running thread belonging to the same process
/freebsd/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/
H A DLSUnit.cpp85 // A store may not pass a previous load or load barrier. in dispatch()
95 // A store may not pass a previous store barrier. in dispatch()
133 // 1) This is a load barrier (by construction, a load barrier is always in dispatch()
137 // 3) There is a load barrier in flight. This load depends on it. in dispatch()
155 // A load may not pass a previous store or store barrier in dispatch()
164 // A load barrier may not pass a previous load or load barrier. in dispatch()
174 // A younger load cannot pass a older load barrier. in dispatch()
/freebsd/tools/test/stress2/misc/
H A Dcallout_reset_on.sh109 barrier(int mode)
115 snprintf(path, sizeof(path), "barrier.%d", getpid());
119 snprintf(path, sizeof(path), "barrier.%d", getppid());
126 snprintf(path, sizeof(path), "barrier.%d", getpid());
130 errx(1, "Bad barrier mode: %d", mode);
143 barrier(BARRIER_WAIT);
266 barrier(BARRIER_DELETE);
296 barrier(BARRIER_CREATE);
328 rm -f /tmp/crwriter /tmp/crlogger ./barrier.*
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DLiveRangeShrink.cpp140 unsigned Barrier = 0; in runOnMachineFunction()
148 // Barrier is the last instruction where MO get used. MI should not in runOnMachineFunction()
149 // be moved above Barrier. in runOnMachineFunction()
150 if (Barrier < UseMap[MO.getReg()].first) { in runOnMachineFunction()
151 Barrier = UseMap[MO.getReg()].first; in runOnMachineFunction()
157 // If MI has side effects, it should become a barrier for code motion. in runOnMachineFunction()
211 // If Barrier equals IOM[I], traverse forward to find if BarrierMI is in runOnMachineFunction()
213 for (MachineInstr *I = Insert; I && IOM[I] == Barrier; in runOnMachineFunction()
220 if (DefMO && Insert && NumEligibleUse > 1 && Barrier <= IOM[Insert]) { in runOnMachineFunction()
138 unsigned Barrier = 0; runOnMachineFunction() local
/freebsd/contrib/llvm-project/llvm/include/llvm/MCA/HardwareUnits/
H A DLSUnit.h379 /// memory-barrier like instructions.
381 /// `unmodeled side effects` behave like a "soft" load-barrier. That means, it
385 /// barrier is a 'mayLoad' and 'mayStore' instruction with unmodeled side
389 /// Each load/store barrier consumes one entry in the load/store queue. A
390 /// load/store barrier enforces ordering of loads/stores:
391 /// - A younger load cannot pass a load barrier.
392 /// - A younger store cannot pass a store barrier.
394 /// A younger load has to wait for the memory load barrier to execute.
395 /// A load/store barrier is "executed" when it becomes the oldest entry in
431 // conservatively treated as a store barrier. It forces older store to be
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DBarrierNoopPass.cpp1 //===- BarrierNoopPass.cpp - A barrier pass for the pass manager ----------===//
26 /// A nonce module pass used to place a barrier in a pass manager.
46 INITIALIZE_PASS(BarrierNoop, "barrier", "A No-Op Barrier Pass",
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dcompiler.h98 #define barrier() __asm__ __volatile__("": : :"memory") macro
107 barrier(); \
109 barrier(); \
114 barrier(); \
117 barrier(); \
/freebsd/sys/contrib/openzfs/lib/libspl/include/
H A Datomic.h300 * Generic memory barrier used during lock entry, placed after the
302 * protects its data. No stores from after the memory barrier will
303 * reach visibility, and no loads from after the barrier will be
309 * Generic memory barrier used during lock exit, placed before the
311 * protects its data. All loads and stores issued before the barrier
317 * Make all stores and loads emitted prior to the the barrier complete before
319 * barrier only start being executed after crossing it.
327 * The memory barrier guarantees that the available flag is not visible
336 * The memory barrier guarantees that the data is not sampled until

12345678910>>...18