Lines Matching refs:poll

119 	struct vhost_poll *poll;  in vhost_poll_func()  local
121 poll = container_of(pt, struct vhost_poll, table); in vhost_poll_func()
122 poll->wqh = wqh; in vhost_poll_func()
123 add_wait_queue(wqh, &poll->wait); in vhost_poll_func()
129 struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait); in vhost_poll_wakeup() local
131 if (!((unsigned long)key & poll->mask)) in vhost_poll_wakeup()
134 vhost_poll_queue(poll); in vhost_poll_wakeup()
149 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, in vhost_poll_init() argument
152 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); in vhost_poll_init()
153 init_poll_funcptr(&poll->table, vhost_poll_func); in vhost_poll_init()
154 poll->mask = mask; in vhost_poll_init()
155 poll->dev = dev; in vhost_poll_init()
156 poll->wqh = NULL; in vhost_poll_init()
158 vhost_work_init(&poll->work, fn); in vhost_poll_init()
164 int vhost_poll_start(struct vhost_poll *poll, struct file *file) in vhost_poll_start() argument
169 if (poll->wqh) in vhost_poll_start()
172 mask = file->f_op->poll(file, &poll->table); in vhost_poll_start()
174 vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask); in vhost_poll_start()
176 if (poll->wqh) in vhost_poll_start()
177 remove_wait_queue(poll->wqh, &poll->wait); in vhost_poll_start()
187 void vhost_poll_stop(struct vhost_poll *poll) in vhost_poll_stop() argument
189 if (poll->wqh) { in vhost_poll_stop()
190 remove_wait_queue(poll->wqh, &poll->wait); in vhost_poll_stop()
191 poll->wqh = NULL; in vhost_poll_stop()
226 void vhost_poll_flush(struct vhost_poll *poll) in vhost_poll_flush() argument
228 vhost_work_flush(poll->dev, &poll->work); in vhost_poll_flush()
248 void vhost_poll_queue(struct vhost_poll *poll) in vhost_poll_queue() argument
250 vhost_work_queue(poll->dev, &poll->work); in vhost_poll_queue()
399 vhost_poll_init(&vq->poll, vq->handle_kick, in vhost_dev_init()
519 vhost_poll_stop(&dev->vqs[i]->poll); in vhost_dev_stop()
520 vhost_poll_flush(&dev->vqs[i]->poll); in vhost_dev_stop()
920 vhost_poll_stop(&vq->poll); in vhost_vring_ioctl()
928 r = vhost_poll_start(&vq->poll, vq->kick); in vhost_vring_ioctl()
933 vhost_poll_flush(&vq->poll); in vhost_vring_ioctl()