* Take the ticketlock. * * @param tl * A pointer to the ticketlock. */
| 61 | * A pointer to the ticketlock. |
| 62 | */ |
| 63 | static inline void |
| 64 | rte_ticketlock_lock(rte_ticketlock_t *tl) |
| 65 | { |
| 66 | uint16_t me = rte_atomic_fetch_add_explicit(&tl->s.next, 1, rte_memory_order_relaxed); |
| 67 | rte_wait_until_equal_16((uint16_t *)(uintptr_t)&tl->s.current, me, |
| 68 | rte_memory_order_acquire); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Release the ticketlock. |