• Home
  • Raw
  • Download

Lines Matching refs:messages

541 	line6->messages.active = 1;  in line6_hwdep_open()
542 line6->messages.nonblock = file->f_flags & O_NONBLOCK ? 1 : 0; in line6_hwdep_open()
552 line6->messages.active = 0; in line6_hwdep_release()
566 if (mutex_lock_interruptible(&line6->messages.read_lock)) in line6_hwdep_read()
569 while (kfifo_len(&line6->messages.fifo) == 0) { in line6_hwdep_read()
570 mutex_unlock(&line6->messages.read_lock); in line6_hwdep_read()
572 if (line6->messages.nonblock) in line6_hwdep_read()
576 line6->messages.wait_queue, in line6_hwdep_read()
577 kfifo_len(&line6->messages.fifo) != 0); in line6_hwdep_read()
581 if (mutex_lock_interruptible(&line6->messages.read_lock)) in line6_hwdep_read()
585 if (kfifo_peek_len(&line6->messages.fifo) > count) { in line6_hwdep_read()
589 rv = kfifo_to_user(&line6->messages.fifo, buf, count, &out_count); in line6_hwdep_read()
594 mutex_unlock(&line6->messages.read_lock); in line6_hwdep_read()
628 poll_wait(file, &line6->messages.wait_queue, wait); in line6_hwdep_poll()
630 mutex_lock(&line6->messages.read_lock); in line6_hwdep_poll()
631 rv = kfifo_len(&line6->messages.fifo) == 0 ? 0 : EPOLLIN | EPOLLRDNORM; in line6_hwdep_poll()
632 mutex_unlock(&line6->messages.read_lock); in line6_hwdep_poll()
648 if (!line6->messages.active) in line6_hwdep_push_message()
651 if (kfifo_avail(&line6->messages.fifo) >= line6->message_length) { in line6_hwdep_push_message()
653 kfifo_in(&line6->messages.fifo, in line6_hwdep_push_message()
657 wake_up_interruptible(&line6->messages.wait_queue); in line6_hwdep_push_message()
667 line6->messages.active = 0; in line6_hwdep_init()
668 init_waitqueue_head(&line6->messages.wait_queue); in line6_hwdep_init()
669 mutex_init(&line6->messages.read_lock); in line6_hwdep_init()
670 INIT_KFIFO(line6->messages.fifo); in line6_hwdep_init()