* Take the recursive ticketlock. * * @param tlr * A pointer to the recursive ticketlock. */
| 160 | * A pointer to the recursive ticketlock. |
| 161 | */ |
| 162 | static inline void |
| 163 | rte_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. |