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

Function rte_atomic16_sub

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

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

Source from the content-addressed store, hash-verified

293 * The value to be subtracted from the counter.
294 */
295static inline void
296rte_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.

Callers 2

rte_atomic16_decFunction · 0.85
test_atomic_usualFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_atomic_usualFunction · 0.68