* Atomically add a 16-bit value to an atomic counter. * * @param v * A pointer to the atomic counter. * @param inc * The value to be added to the counter. */
| 278 | * The value to be added to the counter. |
| 279 | */ |
| 280 | static inline void |
| 281 | rte_atomic16_add(rte_atomic16_t *v, int16_t inc) |
| 282 | { |
| 283 | rte_atomic_fetch_add_explicit((volatile __rte_atomic int16_t *)&v->cnt, inc, |
| 284 | rte_memory_order_seq_cst); |
| 285 | } |
| 286 | |
| 287 | /** |
| 288 | * Atomically subtract a 16-bit value from an atomic counter. |
no outgoing calls