Home
last modified time | relevance | path

Searched refs:old_value (Results 1 – 9 of 9) sorted by relevance

/bionic/libc/private/
Dbionic_atomic_gcc_builtin.h32 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr)… in __bionic_cmpxchg() argument
34 return __sync_val_compare_and_swap(ptr, old_value, new_value) != old_value; in __bionic_cmpxchg()
38 int32_t old_value; in __bionic_swap() local
40 old_value = *ptr; in __bionic_swap()
41 } while (__sync_val_compare_and_swap(ptr, old_value, new_value) != old_value); in __bionic_swap()
42 return old_value; in __bionic_swap()
Dbionic_atomic_mips.h36 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr)… in __bionic_cmpxchg() argument
45 : [new_value]"r"(new_value), [old_value]"r"(old_value), [ptr]"r"(ptr) in __bionic_cmpxchg()
47 return prev != old_value; in __bionic_cmpxchg()
Dbionic_atomic_x86.h35 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr)… in __bionic_cmpxchg() argument
39 : "q" (new_value), "m" (*ptr), "0" (old_value) in __bionic_cmpxchg()
41 return prev != old_value; in __bionic_cmpxchg()
Dbionic_atomic_arm64.h28 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr)… in __bionic_cmpxchg() argument
39 : "r" (ptr), "Ir" (old_value), "r" (new_value) in __bionic_cmpxchg()
41 return oldval != old_value; in __bionic_cmpxchg()
Dbionic_atomic_arm.h32 __ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr)… in __bionic_cmpxchg() argument
44 : "r" (ptr), "Ir" (old_value), "r" (new_value) in __bionic_cmpxchg()
47 return prev != old_value; in __bionic_cmpxchg()
/bionic/libc/bionic/
Dpthread_once.cpp62 int32_t old_value, new_value; in pthread_once() local
65 old_value = *once_control_ptr; in pthread_once()
66 if ((old_value & ONCE_COMPLETED) != 0) { in pthread_once()
70 new_value = old_value | ONCE_INITIALIZING; in pthread_once()
71 } while (__bionic_cmpxchg(old_value, new_value, once_control_ptr) != 0); in pthread_once()
73 if ((old_value & ONCE_COMPLETED) != 0) { in pthread_once()
79 if ((old_value & ONCE_INITIALIZING) == 0) { in pthread_once()
86 __futex_wait_ex(once_control_ptr, 0, old_value, NULL); in pthread_once()
Dpthread_internal.h56 pid_t old_value; in invalidate_cached_pid() local
57 get_cached_pid(&old_value); in invalidate_cached_pid()
59 return old_value; in invalidate_cached_pid()
Dpthread_cond.cpp130 int old_value = cond->value; in __pthread_cond_pulse() local
131 int new_value = ((old_value - COND_COUNTER_STEP) & COND_COUNTER_MASK) | flags; in __pthread_cond_pulse()
132 if (__bionic_cmpxchg(old_value, new_value, &cond->value) == 0) { in __pthread_cond_pulse()
153 int old_value = cond->value; in __pthread_cond_timedwait_relative() local
156 int status = __futex_wait_ex(&cond->value, COND_IS_SHARED(cond->value), old_value, reltime); in __pthread_cond_timedwait_relative()
/bionic/linker/
Ddlfcn.cpp37 const char* old_value = *dlerror_slot; in __bionic_set_dlerror() local
39 return old_value; in __bionic_set_dlerror()
54 const char* old_value = __bionic_set_dlerror(nullptr); in dlerror() local
55 return old_value; in dlerror()