src/dpdk/lib/librte_eal/include/generic/rte_ticketlock.h
static inline int
rte_ticketlock_is_locked(rte_ticketlock_t *tl)
{
	rte_ticketlock_t tic;
	tic.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_ACQUIRE);
	return (tic.s.current != tic.s.next);
}
/**
 * Test if the lock is taken.
 *
 * @param tl
 *   A pointer to the ticketlock.
 * @return
 *   1 if the lock is currently taken; 0 otherwise.
 */
Test if the lock is taken.
@param tl
A pointer to the ticketlock.
@return
1 if the lock is currently taken; 0 otherwise.
Test if the lock is taken . @param tl A pointer to the ticketlock . @return 1 if the lock is currently taken ; 0 otherwise .
static inline int
rte_ticketlock_is_locked(rte_ticketlock_t *tl)
{
	rte_ticketlock_t tic;
	tic.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_ACQUIRE);
	return (tic.s.current != tic.s.next);
}
static inline int rte_ticketlock_is_locked ( rte_ticketlock_t * tl ) { rte_ticketlock_t tic ; tic . tickets = __atomic_load_n ( & tl -> tickets , __ATOMIC_ACQUIRE ) ; return ( tic . s . current != tic . s . next ) ; }
Test if the lock is taken.
Test if the lock is taken .