Lines Matching refs:value

121 static float SC_sign_f32(float value) {
122 if (value > 0) return 1.f;
123 if (value < 0) return -1.f;
124 return value;
262 // The android cas return 0 if it wrote the value. This means the
263 // previous value was the expected value and we can return.
266 // We didn't write the value and need to load the "previous" value.
269 // A race condition exists where the expected value could appear after our cas failed
270 // above. In this case loop until we have a legit previous value or the
285 static int32_t SC_AtomicAdd(volatile int32_t *ptr, int32_t value) {
286 return android_atomic_add(value, ptr);
289 static int32_t SC_AtomicSub(volatile int32_t *ptr, int32_t value) {
293 status = android_atomic_release_cas(prev, prev - value, ptr);
298 static int32_t SC_AtomicAnd(volatile int32_t *ptr, int32_t value) {
299 return android_atomic_and(value, ptr);
302 static int32_t SC_AtomicOr(volatile int32_t *ptr, int32_t value) {
303 return android_atomic_or(value, ptr);
306 static int32_t SC_AtomicXor(volatile int32_t *ptr, int32_t value) {
310 status = android_atomic_release_cas(prev, prev ^ value, ptr);
315 static uint32_t SC_AtomicUMin(volatile uint32_t *ptr, uint32_t value) {
319 uint32_t n = rsMin(value, prev);
325 static int32_t SC_AtomicMin(volatile int32_t *ptr, int32_t value) {
329 int32_t n = rsMin(value, prev);
335 static uint32_t SC_AtomicUMax(volatile uint32_t *ptr, uint32_t value) {
339 uint32_t n = rsMax(value, prev);
345 static int32_t SC_AtomicMax(volatile int32_t *ptr, int32_t value) {
349 int32_t n = rsMax(value, prev);