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

Function rte_ticketlock_recursive_lock

dpdk/lib/eal/include/rte_ticketlock.h:162–172  ·  view source on GitHub ↗

* Take the recursive ticketlock. * * @param tlr * A pointer to the recursive ticketlock. */

Source from the content-addressed store, hash-verified

160 * A pointer to the recursive ticketlock.
161 */
162static inline void
163rte_ticketlock_recursive_lock(rte_ticketlock_recursive_t *tlr)
164{
165 int id = rte_gettid();
166
167 if (rte_atomic_load_explicit(&tlr->user, rte_memory_order_relaxed) != id) {
168 rte_ticketlock_lock(&tlr->tl);
169 rte_atomic_store_explicit(&tlr->user, id, rte_memory_order_relaxed);
170 }
171 tlr->count++;
172}
173
174/**
175 * Release the recursive ticketlock.

Callers 2

test_ticketlockFunction · 0.85

Calls 2

rte_gettidFunction · 0.85
rte_ticketlock_lockFunction · 0.85

Tested by 2

test_ticketlockFunction · 0.68