Home
last modified time | relevance | path

Searched refs:memory_order_relaxed (Results 1 – 15 of 15) sorted by relevance

/bionic/tests/
Dstdatomic_test.cpp51 atomic_thread_fence(memory_order_relaxed); in TEST()
60 atomic_signal_fence(memory_order_relaxed); in TEST()
82 ASSERT_FALSE(atomic_flag_test_and_set_explicit(&f, memory_order_relaxed)); in TEST()
83 ASSERT_TRUE(atomic_flag_test_and_set_explicit(&f, memory_order_relaxed)); in TEST()
85 atomic_flag_clear_explicit(&f, memory_order_relaxed); in TEST()
86 ASSERT_FALSE(atomic_flag_test_and_set_explicit(&f, memory_order_relaxed)); in TEST()
93 atomic_store_explicit(&i, 123, memory_order_relaxed); in TEST()
94 ASSERT_EQ(123, atomic_load_explicit(&i, memory_order_relaxed)); in TEST()
101 ASSERT_EQ(456, atomic_exchange_explicit(&i, 123, memory_order_relaxed)); in TEST()
116 ASSERT_TRUE(atomic_compare_exchange_strong_explicit(&i, &expected, 456, memory_order_relaxed, in TEST()
[all …]
/bionic/libc/bionic/
Dpthread_mutex.cpp155 memory_order_relaxed))) { in PIMutexTryLock()
199 memory_order_relaxed))) { in PIMutexUnlock()
203 old_owner = atomic_load_explicit(&mutex.owner_tid, memory_order_relaxed); in PIMutexUnlock()
221 memory_order_relaxed))) { in PIMutexUnlock()
233 memory_order_relaxed, memory_order_relaxed)) { in PIMutexDestroy()
562 locked_uncontended, memory_order_acquire, memory_order_relaxed))) { in NormalMutexTryLock()
680 atomic_fetch_add_explicit(&mutex->state, MUTEX_COUNTER_BITS_ONE, memory_order_relaxed); in RecursiveIncrement()
704 uint32_t owner_tid = atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed); in RecursiveOrErrorcheckMutexWait()
713 uint16_t old_state = atomic_load_explicit(&mutex->state, memory_order_relaxed); in MutexLockWithTimeout()
724 if (tid == atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed)) { in MutexLockWithTimeout()
[all …]
Dpthread_rwlock.cpp257 if (atomic_load_explicit(&rwlock->state, memory_order_relaxed) != 0) { in pthread_rwlock_destroy()
273 int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed); in __pthread_rwlock_tryrdlock()
282 memory_order_acquire, memory_order_relaxed))) { in __pthread_rwlock_tryrdlock()
291 if (atomic_load_explicit(&rwlock->writer_tid, memory_order_relaxed) == __get_thread()->tid) { in __pthread_rwlock_timedrdlock()
305 int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed); in __pthread_rwlock_timedrdlock()
318 memory_order_relaxed); in __pthread_rwlock_timedrdlock()
333 memory_order_relaxed); in __pthread_rwlock_timedrdlock()
348 int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed); in __pthread_rwlock_trywrlock()
352 __state_add_writer_flag(old_state), memory_order_acquire, memory_order_relaxed))) { in __pthread_rwlock_trywrlock()
354 atomic_store_explicit(&rwlock->writer_tid, __get_thread()->tid, memory_order_relaxed); in __pthread_rwlock_trywrlock()
[all …]
Dpthread_key.cpp85 uintptr_t seq = atomic_load_explicit(&key_map[i].seq, memory_order_relaxed); in pthread_key_clean_all()
95 atomic_load_explicit(&key_map[i].key_destructor, memory_order_relaxed)); in pthread_key_clean_all()
100 if (atomic_load_explicit(&key_map[i].seq, memory_order_relaxed) != seq) { in pthread_key_clean_all()
126 uintptr_t seq = atomic_load_explicit(&key_map[i].seq, memory_order_relaxed); in pthread_key_create()
149 uintptr_t seq = atomic_load_explicit(&key_map[key].seq, memory_order_relaxed); in pthread_key_delete()
164 uintptr_t seq = atomic_load_explicit(&key_map[key].seq, memory_order_relaxed); in pthread_getspecific()
183 uintptr_t seq = atomic_load_explicit(&key_map[key].seq, memory_order_relaxed); in pthread_setspecific()
Dpthread_cond.cpp111 return COND_IS_SHARED(atomic_load_explicit(&state, memory_order_relaxed)); in process_shared()
115 return COND_GET_CLOCK(atomic_load_explicit(&state, memory_order_relaxed)) == CLOCK_REALTIME; in use_realtime_clock()
149 atomic_store_explicit(&cond->state, 0xdeadc04d, memory_order_relaxed); in pthread_cond_destroy()
167 atomic_fetch_add_explicit(&cond->state, COND_COUNTER_STEP, memory_order_relaxed); in __pthread_cond_pulse()
180 unsigned int old_state = atomic_load_explicit(&cond->state, memory_order_relaxed); in __pthread_cond_timedwait()
Dsemaphore.cpp100 return (atomic_load_explicit(sem_count_ptr, memory_order_relaxed) & SEMCOUNT_SHARED_MASK); in SEM_GET_SHARED()
144 unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed); in __sem_dec()
164 unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed); in __sem_trydec()
188 unsigned int old_value = atomic_load_explicit(sem_count_ptr, memory_order_relaxed); in __sem_inc()
Dpthread_barrier.cpp124 uint32_t prev_wait_count = atomic_load_explicit(&barrier->wait_count, memory_order_relaxed); in pthread_barrier_wait()
137 memory_order_relaxed)) { in pthread_barrier_wait()
178 if (atomic_load_explicit(&barrier->wait_count, memory_order_relaxed) != 0) { in pthread_barrier_destroy()
Dmalloc_limit.cpp99 atomic_load_explicit(&gAllocated, memory_order_relaxed), bytes, &total) || in CheckLimit()
/bionic/benchmarks/
Datomic_benchmark.cpp58 result += test_loc.load(std::memory_order_relaxed); in BM_atomic_load_relaxed()
96 result += test_loc.fetch_add(1, std::memory_order_relaxed); in BM_atomic_fetch_add_relaxed()
119 result += test_loc.load(std::memory_order_relaxed); in BM_atomic_acquire_fence()
130 result += test_loc.load(std::memory_order_relaxed); in BM_atomic_seq_cst_fence()
/bionic/libc/system_properties/
Dsystem_properties.cpp159 new_serial = load_const_atomic(&pi->serial, memory_order_relaxed); in ReadMutablePropertyValue()
204 uint32_t serial = load_const_atomic(&pi->serial, memory_order_relaxed); in ReadCallback()
248 uint32_t serial = atomic_load_explicit(&pi->serial, memory_order_relaxed); in Update()
258 atomic_store_explicit(&pi->serial, serial, memory_order_relaxed); in Update()
263 atomic_store_explicit(&pi->serial, (len << 24) | ((serial + 1) & 0xffffff), memory_order_relaxed); in Update()
266 atomic_load_explicit(serial_pa->serial(), memory_order_relaxed) + 1, in Update()
306 atomic_load_explicit(serial_pa->serial(), memory_order_relaxed) + 1, in Add()
Dprop_area.cpp240 uint_least32_t left_offset = atomic_load_explicit(&current->left, memory_order_relaxed); in find_prop_bt()
256 uint_least32_t right_offset = atomic_load_explicit(&current->right, memory_order_relaxed); in find_prop_bt()
292 uint_least32_t children_offset = atomic_load_explicit(&current->children, memory_order_relaxed); in find_property()
317 uint_least32_t prop_offset = atomic_load_explicit(&current->prop, memory_order_relaxed); in find_property()
337 uint_least32_t left_offset = atomic_load_explicit(&trie->left, memory_order_relaxed); in foreach_property()
342 uint_least32_t prop_offset = atomic_load_explicit(&trie->prop, memory_order_relaxed); in foreach_property()
348 uint_least32_t children_offset = atomic_load_explicit(&trie->children, memory_order_relaxed); in foreach_property()
353 uint_least32_t right_offset = atomic_load_explicit(&trie->right, memory_order_relaxed); in foreach_property()
/bionic/libc/private/
Dbionic_lock.h56 LockedWithoutWaiter, memory_order_acquire, memory_order_relaxed)); in trylock()
62 LockedWithoutWaiter, memory_order_acquire, memory_order_relaxed))) { in lock()
/bionic/libc/system_properties/include/system_properties/
Dprop_info.h71 return (load_const_atomic(&serial, memory_order_relaxed) & kLongFlag) != 0; in is_long()
/bionic/libc/include/
Dstdatomic.h83 using std::memory_order_relaxed;
/bionic/libc/include/bits/
Dstdatomic.h129 memory_order_relaxed = __ATOMIC_RELAXED, enumerator