Lines Matching defs:poll
19 #include <linux/poll.h>
157 struct vhost_poll *poll;
159 poll = container_of(pt, struct vhost_poll, table);
160 poll->wqh = wqh;
161 add_wait_queue(wqh, &poll->wait);
167 struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait);
168 struct vhost_work *work = &poll->work;
170 if (!(key_to_poll(key) & poll->mask))
173 if (!poll->dev->use_worker)
176 vhost_poll_queue(poll);
188 /* Init poll structure */
189 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
193 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup);
194 init_poll_funcptr(&poll->table, vhost_poll_func);
195 poll->mask = mask;
196 poll->dev = dev;
197 poll->wqh = NULL;
198 poll->vq = vq;
200 vhost_work_init(&poll->work, fn);
206 int vhost_poll_start(struct vhost_poll *poll, struct file *file)
210 if (poll->wqh)
213 mask = vfs_poll(file, &poll->table);
215 vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask));
217 vhost_poll_stop(poll);
227 void vhost_poll_stop(struct vhost_poll *poll)
229 if (poll->wqh) {
230 remove_wait_queue(poll->wqh, &poll->wait);
231 poll->wqh = NULL;
329 void vhost_poll_queue(struct vhost_poll *poll)
331 vhost_vq_work_queue(poll->vq, &poll->work);
471 vhost_poll_queue(&vq->poll);
540 vhost_poll_init(&vq->poll, vq->handle_kick,
705 /* Make sure new vq queue/flush/poll calls see the new worker */
944 vhost_poll_stop(&dev->vqs[i]->poll);
1342 vhost_poll_queue(&node->vq->poll);
1997 vhost_poll_stop(&vq->poll);
2005 r = vhost_poll_start(&vq->poll, vq->kick);
2010 vhost_dev_flush(vq->poll.dev);