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

Function rte_spinlock_trylock

dpdk/lib/eal/include/generic/rte_spinlock.h:111–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110#ifdef RTE_FORCE_INTRINSICS
111static inline int
112rte_spinlock_trylock(rte_spinlock_t *sl)
113 __rte_no_thread_safety_analysis
114{
115 int exp = 0;
116 return rte_atomic_compare_exchange_strong_explicit(&sl->locked, &exp, 1,
117 rte_memory_order_acquire, rte_memory_order_relaxed);
118}
119#endif
120
121/**

Callers 1

rte_spinlock.hFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected