Lines Matching refs:head

73 	bool restart = buf->head->commit != buf->head->read;  in tty_buffer_unlock_exclusive()
128 while ((p = buf->head) != NULL) { in tty_buffer_free_all()
129 buf->head = p->next; in tty_buffer_free_all()
139 buf->head = &buf->sentinel; in tty_buffer_free_all()
233 while ((next = smp_load_acquire(&buf->head->next)) != NULL) { in tty_buffer_flush()
234 tty_buffer_free(port, buf->head); in tty_buffer_flush()
235 buf->head = next; in tty_buffer_flush()
237 buf->head->read = buf->head->commit; in tty_buffer_flush()
238 buf->head->lookahead = buf->head->read; in tty_buffer_flush()
397 static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head) in lookahead_bufs() argument
399 head->lookahead = max(head->lookahead, head->read); in lookahead_bufs()
401 while (head) { in lookahead_bufs()
410 next = smp_load_acquire(&head->next); in lookahead_bufs()
415 count = smp_load_acquire(&head->commit) - head->lookahead; in lookahead_bufs()
417 head = next; in lookahead_bufs()
424 p = char_buf_ptr(head, head->lookahead); in lookahead_bufs()
425 if (head->flags) in lookahead_bufs()
426 f = flag_buf_ptr(head, head->lookahead); in lookahead_bufs()
431 head->lookahead += count; in lookahead_bufs()
436 receive_buf(struct tty_port *port, struct tty_buffer *head, size_t count) in receive_buf() argument
438 u8 *p = char_buf_ptr(head, head->read); in receive_buf()
442 if (head->flags) in receive_buf()
443 f = flag_buf_ptr(head, head->read); in receive_buf()
470 struct tty_buffer *head = buf->head; in flush_to_ldisc() local
482 next = smp_load_acquire(&head->next); in flush_to_ldisc()
486 count = smp_load_acquire(&head->commit) - head->read; in flush_to_ldisc()
490 buf->head = next; in flush_to_ldisc()
491 tty_buffer_free(port, head); in flush_to_ldisc()
495 rcvd = receive_buf(port, head, count); in flush_to_ldisc()
496 head->read += rcvd; in flush_to_ldisc()
498 lookahead_bufs(port, head); in flush_to_ldisc()
581 buf->head = &buf->sentinel; in tty_buffer_init()