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