* Use rte_ticketlock_trylock() to trylock a ticketlock object, * If it could not lock the object successfully, it would * return immediately and the variable of "count" would be * increased by one per times. the value of "count" could be * checked as the result later. */
| 184 | * checked as the result later. |
| 185 | */ |
| 186 | static int |
| 187 | test_ticketlock_try(__rte_unused void *arg) |
| 188 | { |
| 189 | if (rte_ticketlock_trylock(&tl_try) == 0) { |
| 190 | rte_ticketlock_lock(&tl); |
| 191 | count++; |
| 192 | rte_ticketlock_unlock(&tl); |
| 193 | } |
| 194 | |
| 195 | return 0; |
| 196 | } |
| 197 | |
| 198 | |
| 199 | /* |
nothing calls this directly
no test coverage detected