/Zephyr-latest/lib/os/ |
D | sem.c | 16 atomic_t old_value, new_value; in bounded_dec() local 19 old_value = atomic_get(val); in bounded_dec() 20 if (old_value < minimum) { in bounded_dec() 24 new_value = old_value - 1; in bounded_dec() 25 } while (atomic_cas(val, old_value, new_value) == 0); in bounded_dec() 27 return old_value; in bounded_dec() 33 atomic_t old_value, new_value; in bounded_inc() local 36 old_value = atomic_get(val); in bounded_inc() 37 if (old_value >= maximum) { in bounded_inc() 41 new_value = ((old_value < minimum) ? minimum : old_value) + 1; in bounded_inc() [all …]
|
/Zephyr-latest/subsys/timing/ |
D | timing.c | 49 atomic_t old_value, new_value; in timing_stop() local 53 old_value = atomic_get(&started_ref); in timing_stop() 54 if (old_value <= 0) { in timing_stop() 58 new_value = old_value - 1; in timing_stop() 59 } while (atomic_cas(&started_ref, old_value, new_value) == 0); in timing_stop() 64 if (old_value > 1) { in timing_stop()
|
/Zephyr-latest/subsys/net/lib/prometheus/ |
D | counter.c | 30 uint64_t old_value; in prometheus_counter_set() local 40 old_value = counter->value; in prometheus_counter_set() 41 if (value < old_value) { in prometheus_counter_set() 43 value, old_value); in prometheus_counter_set() 47 counter->value += (value - old_value); in prometheus_counter_set()
|
/Zephyr-latest/tests/lib/hash_map/src/ |
D | insert.c | 29 uint64_t old_value; in ZTEST() local 37 old_value = 0x42; in ZTEST() 38 zassert_equal(0, sys_hashmap_insert(&map, 1, 2, &old_value)); in ZTEST() 39 zassert_equal(1, old_value); in ZTEST()
|
/Zephyr-latest/kernel/ |
D | atomic_c.c | 81 bool z_impl_atomic_cas(atomic_t *target, atomic_val_t old_value, in z_impl_atomic_cas() argument 97 if (*target == old_value) { in z_impl_atomic_cas() 108 bool z_vrfy_atomic_cas(atomic_t *target, atomic_val_t old_value, in z_vrfy_atomic_cas() argument 113 return z_impl_atomic_cas((atomic_t *)target, old_value, new_value); in z_vrfy_atomic_cas() 118 bool z_impl_atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value, in z_impl_atomic_ptr_cas() argument 126 if (*target == old_value) { in z_impl_atomic_ptr_cas() 138 atomic_ptr_val_t old_value, in z_vrfy_atomic_ptr_cas() argument 143 return z_impl_atomic_ptr_cas(target, old_value, new_value); in z_vrfy_atomic_ptr_cas()
|
/Zephyr-latest/include/zephyr/sys/ |
D | atomic_builtin.h | 23 static inline bool atomic_cas(atomic_t *target, atomic_val_t old_value, in atomic_cas() argument 26 return __atomic_compare_exchange_n(target, &old_value, new_value, in atomic_cas() 31 static inline bool atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value, in atomic_ptr_cas() argument 34 return __atomic_compare_exchange_n(target, &old_value, new_value, in atomic_ptr_cas()
|
D | atomic_arch.h | 18 bool atomic_cas(atomic_t *target, atomic_val_t old_value, 21 bool atomic_ptr_cas(atomic_ptr_t *target, void *old_value,
|
D | atomic_c.h | 20 __syscall bool atomic_cas(atomic_t *target, atomic_val_t old_value, 23 __syscall bool atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value,
|
D | atomic.h | 254 bool atomic_cas(atomic_t *target, atomic_val_t old_value, atomic_val_t new_value); 271 bool atomic_ptr_cas(atomic_ptr_t *target, atomic_ptr_val_t old_value,
|
D | hash_map.h | 187 uint64_t *old_value) in sys_hashmap_insert() argument 189 return map->api->insert(map, key, value, old_value); in sys_hashmap_insert()
|
D | hash_map_api.h | 135 uint64_t *old_value);
|
/Zephyr-latest/lib/hash/ |
D | hash_map_cxx.cpp | 70 uint64_t *old_value) in sys_hashmap_cxx_insert() argument 81 if (it != umap->end() && old_value != nullptr) { in sys_hashmap_cxx_insert() 82 *old_value = it->second; in sys_hashmap_cxx_insert()
|
D | hash_map_oa_lp.c | 77 uint64_t *old_value) in sys_hashmap_oa_lp_insert_no_rehash() argument 102 if (old_value != NULL) { in sys_hashmap_oa_lp_insert_no_rehash() 103 *old_value = entry->value; in sys_hashmap_oa_lp_insert_no_rehash() 235 uint64_t *old_value) in sys_hashmap_oa_lp_insert() argument 244 return sys_hashmap_oa_lp_insert_no_rehash(map, key, value, old_value); in sys_hashmap_oa_lp_insert()
|
D | hash_map_sc.c | 221 uint64_t *old_value) in sys_hashmap_sc_insert() argument 228 if (old_value != NULL) { in sys_hashmap_sc_insert() 229 *old_value = entry->value; in sys_hashmap_sc_insert()
|
/Zephyr-latest/drivers/usb_c/tcpc/ |
D | tcpci.c | 253 uint8_t old_value; in tcpci_update_reg8() local 256 ret = tcpci_read_reg8(i2c, reg, &old_value); in tcpci_update_reg8() 261 old_value &= ~mask; in tcpci_update_reg8() 262 old_value |= (value & mask); in tcpci_update_reg8() 264 ret = tcpci_write_reg8(i2c, reg, old_value); in tcpci_update_reg8()
|
/Zephyr-latest/modules/hal_nordic/nrfx/ |
D | nrfx_glue.h | 234 #define NRFX_ATOMIC_CAS(p_data, old_value, new_value) \ argument 235 atomic_cas(p_data, old_value, new_value)
|
/Zephyr-latest/drivers/video/ |
D | gc2145.c | 797 uint8_t old_value; in gc2145_set_ctrl_vflip() local 799 ret = gc2145_read_reg(&cfg->i2c, GC2145_REG_AMODE1, &old_value); in gc2145_set_ctrl_vflip() 806 (old_value & GC2145_AMODE1_WINDOW_MASK) | (enable << 1)); in gc2145_set_ctrl_vflip() 813 uint8_t old_value; in gc2145_set_ctrl_hmirror() local 815 ret = gc2145_read_reg(&cfg->i2c, GC2145_REG_AMODE1, &old_value); in gc2145_set_ctrl_hmirror() 822 (old_value & GC2145_AMODE1_WINDOW_MASK) | enable); in gc2145_set_ctrl_hmirror()
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_aw9523b.c | 155 gpio_port_value_t old_value; in gpio_aw9523b_port_read_write_toggle() local 185 old_value = sys_get_le16(buf); in gpio_aw9523b_port_read_write_toggle() 188 new_value = (old_value & ~mask) | (*value & mask); in gpio_aw9523b_port_read_write_toggle() 190 new_value = (old_value & ~mask) | (~old_value & mask); in gpio_aw9523b_port_read_write_toggle() 193 if (new_value == old_value) { in gpio_aw9523b_port_read_write_toggle()
|
/Zephyr-latest/subsys/net/ip/ |
D | tp_priv.h | 72 uint32_t old_value; member
|
D | tp.c | 282 (_seq)->old_value, (_seq)->value, \ 300 seq->old_value = *pvalue; in tp_seq_track() 303 seq->of = __builtin_uadd_overflow(seq->old_value, seq->req, in tp_seq_track() 502 int new_value, old_value = *((int *) value); in tp_new_find_and_apply() local 506 tp_dbg("%s %d->%d", key, old_value, new_value); in tp_new_find_and_apply()
|
/Zephyr-latest/drivers/sensor/ams/tsl2591/ |
D | tsl2591.c | 34 uint8_t old_value, new_value; in tsl2591_reg_update() local 37 ret = tsl2591_reg_read(dev, reg, &old_value, 1U); in tsl2591_reg_update() 42 new_value = (old_value & ~mask) | (val & mask); in tsl2591_reg_update() 43 if (new_value == old_value) { in tsl2591_reg_update()
|
/Zephyr-latest/drivers/sensor/vishay/vcnl36825t/ |
D | vcnl36825t.c | 50 uint16_t old_value, new_value; in vcnl36825t_update() local 52 rc = vcnl36825t_read(spec, reg_addr, &old_value); in vcnl36825t_update() 57 new_value = (old_value & ~mask) | (value & mask); in vcnl36825t_update() 59 if (new_value == old_value) { in vcnl36825t_update()
|
/Zephyr-latest/drivers/sensor/bosch/bmp388/ |
D | bmp388.c | 78 uint8_t old_value, new_value; in bmp388_reg_field_update() local 81 rc = cfg->bus_io->read(&cfg->bus, reg, &old_value, 1); in bmp388_reg_field_update() 86 new_value = (old_value & ~mask) | (val & mask); in bmp388_reg_field_update() 87 if (new_value == old_value) { in bmp388_reg_field_update()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | i3c.h | 2040 uint8_t old_value, new_value; in i3c_reg_update_byte() local 2043 rc = i3c_reg_read_byte(target, reg_addr, &old_value); in i3c_reg_update_byte() 2048 new_value = (old_value & ~mask) | (value & mask); in i3c_reg_update_byte() 2049 if (new_value == old_value) { in i3c_reg_update_byte()
|
/Zephyr-latest/drivers/sensor/bosch/bmm150/ |
D | bmm150.c | 65 uint8_t old_value, new_value; in bmm150_reg_update_byte() local 67 ret = bmm150_reg_read(dev, reg, &old_value, 1); in bmm150_reg_update_byte() 73 new_value = (old_value & ~mask) | (value & mask); in bmm150_reg_update_byte() 75 if (new_value == old_value) { in bmm150_reg_update_byte()
|