Lines Matching refs:bakery
44 static unsigned int bakery_get_ticket(bakery_lock_t *bakery, unsigned int me) in bakery_get_ticket() argument
50 assert(bakery_ticket_number(bakery->lock_data[me]) == 0U); in bakery_get_ticket()
63 bakery->lock_data[me] = make_bakery_data(CHOOSING_TICKET, my_ticket); in bakery_get_ticket()
65 their_ticket = bakery_ticket_number(bakery->lock_data[they]); in bakery_get_ticket()
75 bakery->lock_data[me] = make_bakery_data(CHOSEN_TICKET, my_ticket); in bakery_get_ticket()
92 void bakery_lock_get(bakery_lock_t *bakery) in bakery_lock_get() argument
100 assert_bakery_entry_valid(me, bakery); in bakery_lock_get()
103 my_ticket = bakery_get_ticket(bakery, me); in bakery_lock_get()
116 their_bakery_data = bakery->lock_data[they]; in bakery_lock_get()
135 bakery_ticket_number(bakery->lock_data[they])); in bakery_lock_get()
149 void bakery_lock_release(bakery_lock_t *bakery) in bakery_lock_release() argument
153 assert_bakery_entry_valid(me, bakery); in bakery_lock_release()
154 assert(bakery_ticket_number(bakery->lock_data[me]) != 0U); in bakery_lock_release()
163 bakery->lock_data[me] = 0U; in bakery_lock_release()