Lines Matching defs:ticket
65 * queues. The lock uses a "ticket / now serving" model to
129 /* You have lock when this is your ticket */
150 * ll/sc used to get a ticket. If this is not the case, the update
154 uint64_t ticket[(CVMX_CMD_QUEUE_END >> 16) * 256];
251 "li %[ticket], 1\n"
253 "baddu %[ticket], %[my_ticket]\n"
254 "sc %[ticket], %[ticket_ptr]\n"
255 "beqz %[ticket], 1b\n"
257 /* Load the current now_serving ticket */
258 "lbu %[ticket], %[now_serving]\n"
261 "beq %[ticket], %[my_ticket], 4f\n"
263 " subu %[ticket], %[my_ticket], %[ticket]\n"
265 "subu %[ticket], 1\n"
267 "cins %[ticket], %[ticket], 5, 7\n"
269 /* Loop here until our ticket might be up */
270 "bnez %[ticket], 3b\n"
271 " subu %[ticket], 1\n"
272 /* Jump back up to check out ticket again */
274 /* Load the current now_serving ticket */
275 " lbu %[ticket], %[now_serving]\n"
278 [ticket_ptr] "=" GCC_OFF_SMALL_ASM()(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]),
279 [now_serving] "=m"(qptr->now_serving), [ticket] "=r"(tmp),