* Atomically subtract a 16-bit value from an atomic counter. * * @param v * A pointer to the atomic counter. * @param dec * The value to be subtracted from the counter. */
| 293 | * The value to be subtracted from the counter. |
| 294 | */ |
| 295 | static inline void |
| 296 | rte_atomic16_sub(rte_atomic16_t *v, int16_t dec) |
| 297 | { |
| 298 | rte_atomic_fetch_sub_explicit((volatile __rte_atomic int16_t *)&v->cnt, dec, |
| 299 | rte_memory_order_seq_cst); |
| 300 | } |
| 301 | |
| 302 | /** |
| 303 | * Atomically increment a counter by one. |
no outgoing calls