* Atomically add a 32-bit value to an atomic counter. * * @param v * A pointer to the atomic counter. * @param inc * The value to be added to the counter. */
| 563 | * The value to be added to the counter. |
| 564 | */ |
| 565 | static inline void |
| 566 | rte_atomic32_add(rte_atomic32_t *v, int32_t inc) |
| 567 | { |
| 568 | rte_atomic_fetch_add_explicit((volatile __rte_atomic int32_t *)&v->cnt, inc, |
| 569 | rte_memory_order_seq_cst); |
| 570 | } |
| 571 | |
| 572 | /** |
| 573 | * Atomically subtract a 32-bit value from an atomic counter. |
no outgoing calls