Lines Matching refs:printstate
203 static struct print_state printstate; variable
437 printstate.ticket_counter = 0; in init_printstate()
438 printstate.ticket_completed = 0; in init_printstate()
439 printstate.cnt = 0; in init_printstate()
441 mutex_init(&printstate.mutex, NULL); in init_printstate()
445 cond_init(&printstate.cond, &cattr); in init_printstate()
665 r = ++(printstate.ticket_counter); in printstate_next_ticket()
667 req->ticket_completed_ref = printstate.ticket_completed; in printstate_next_ticket()
668 cond_broadcast(&printstate.cond); in printstate_next_ticket()
675 if (req->ticket > printstate.ticket_completed) in printstate_mark_req_completed()
676 printstate.ticket_completed = req->ticket; in printstate_mark_req_completed()
682 return (printstate.ticket_counter != req->ticket); in printstate_has_new_req_arrived()
689 mutex_lock(&printstate.cnt_mutex); in printstate_cnt_inc()
690 value = ++printstate.cnt; in printstate_cnt_inc()
691 mutex_unlock(&printstate.cnt_mutex); in printstate_cnt_inc()
699 mutex_lock(&printstate.cnt_mutex); in printstate_cnt_dec()
700 value = --printstate.cnt; in printstate_cnt_dec()
701 mutex_unlock(&printstate.cnt_mutex); in printstate_cnt_dec()
709 mutex_lock(&printstate.cnt_mutex); in printstate_cnt_read()
710 value = printstate.cnt; in printstate_cnt_read()
711 mutex_unlock(&printstate.cnt_mutex); in printstate_cnt_read()
718 return (printstate.ticket_completed != req->ticket_completed_ref); in prev_req_won_race()
1016 mutex_lock(&printstate.mutex); in go_to_sleep()
1018 cond_timedwait(&printstate.cond, &printstate.mutex, &future); in go_to_sleep()
1025 mutex_unlock(&printstate.mutex); in go_to_sleep()
1519 mutex_lock(&printstate.mutex); in tracing_loop()
1524 mutex_unlock(&printstate.mutex); in tracing_loop()
1534 mutex_unlock(&printstate.mutex); in tracing_loop()
1573 mutex_lock(&printstate.mutex); in do_printloop()
1576 mutex_unlock(&printstate.mutex); in do_printloop()
1582 mutex_unlock(&printstate.mutex); in do_printloop()
1607 mutex_lock(&printstate.mutex); in do_printloop()
1609 mutex_unlock(&printstate.mutex); in do_printloop()