MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_atomic32_sub

Function rte_atomic32_sub

dpdk/lib/eal/include/generic/rte_atomic.h:580–585  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

578 * The value to be subtracted from the counter.
579 */
580static inline void
581rte_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.

Calls

no outgoing calls