* Atomically subtract a 32-bit value from an atomic counter. * * @param v * A pointer to the atomic counter. * @param dec * The value to be subtracted from the counter. */
| 578 | * The value to be subtracted from the counter. |
| 579 | */ |
| 580 | static inline void |
| 581 | rte_atomic32_sub(rte_atomic32_t *v, int32_t dec) |
| 582 | { |
| 583 | rte_atomic_fetch_sub_explicit((volatile __rte_atomic int32_t *)&v->cnt, dec, |
| 584 | rte_memory_order_seq_cst); |
| 585 | } |
| 586 | |
| 587 | /** |
| 588 | * Atomically increment a counter by one. |
no outgoing calls