Lines Matching refs:poll
42 struct vhost_poll *poll; in vhost_poll_func() local
44 poll = container_of(pt, struct vhost_poll, table); in vhost_poll_func()
45 poll->wqh = wqh; in vhost_poll_func()
46 add_wait_queue(wqh, &poll->wait); in vhost_poll_func()
52 struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait); in vhost_poll_wakeup() local
54 if (!((unsigned long)key & poll->mask)) in vhost_poll_wakeup()
57 vhost_poll_queue(poll); in vhost_poll_wakeup()
72 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, in vhost_poll_init() argument
75 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); in vhost_poll_init()
76 init_poll_funcptr(&poll->table, vhost_poll_func); in vhost_poll_init()
77 poll->mask = mask; in vhost_poll_init()
78 poll->dev = dev; in vhost_poll_init()
79 poll->wqh = NULL; in vhost_poll_init()
81 vhost_work_init(&poll->work, fn); in vhost_poll_init()
87 int vhost_poll_start(struct vhost_poll *poll, struct file *file) in vhost_poll_start() argument
92 if (poll->wqh) in vhost_poll_start()
95 mask = file->f_op->poll(file, &poll->table); in vhost_poll_start()
97 vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask); in vhost_poll_start()
99 if (poll->wqh) in vhost_poll_start()
100 remove_wait_queue(poll->wqh, &poll->wait); in vhost_poll_start()
110 void vhost_poll_stop(struct vhost_poll *poll) in vhost_poll_stop() argument
112 if (poll->wqh) { in vhost_poll_stop()
113 remove_wait_queue(poll->wqh, &poll->wait); in vhost_poll_stop()
114 poll->wqh = NULL; in vhost_poll_stop()
149 void vhost_poll_flush(struct vhost_poll *poll) in vhost_poll_flush() argument
151 vhost_work_flush(poll->dev, &poll->work); in vhost_poll_flush()
171 void vhost_poll_queue(struct vhost_poll *poll) in vhost_poll_queue() argument
173 vhost_work_queue(poll->dev, &poll->work); in vhost_poll_queue()
320 vhost_poll_init(&vq->poll, vq->handle_kick, in vhost_dev_init()
440 vhost_poll_stop(&dev->vqs[i]->poll); in vhost_dev_stop()
441 vhost_poll_flush(&dev->vqs[i]->poll); in vhost_dev_stop()
814 vhost_poll_stop(&vq->poll); in vhost_vring_ioctl()
822 r = vhost_poll_start(&vq->poll, vq->kick); in vhost_vring_ioctl()
827 vhost_poll_flush(&vq->poll); in vhost_vring_ioctl()