Lines Matching refs:poll
44 #include <linux/poll.h>
89 struct vcs_poll_data *poll =
91 int currcons = poll->cons_num;
112 poll->event = code;
113 wake_up_interruptible(&poll->waitq);
114 kill_fasync(&poll->fasync, SIGIO, fa_band);
119 vcs_poll_data_free(struct vcs_poll_data *poll)
121 unregister_vt_notifier(&poll->notifier);
122 kfree(poll);
128 struct vcs_poll_data *poll = file->private_data, *kill = NULL;
130 if (poll)
131 return poll;
133 poll = kzalloc(sizeof(*poll), GFP_KERNEL);
134 if (!poll)
136 poll->cons_num = console(file_inode(file));
137 init_waitqueue_head(&poll->waitq);
138 poll->notifier.notifier_call = vcs_notifier;
143 * support POLLPRI on /dev/vcs* devices i.e. using poll() with
146 poll->event = VT_UPDATE;
148 if (register_vt_notifier(&poll->notifier) != 0) {
149 kfree(poll);
154 * This code may be called either through ->poll() or ->fasync().
163 file->private_data = poll;
166 kill = poll;
167 poll = file->private_data;
173 return poll;
369 struct vcs_poll_data *poll;
397 poll = file->private_data;
398 if (count && poll)
399 poll->event = 0;
714 struct vcs_poll_data *poll = vcs_poll_data_get(file);
717 if (poll) {
718 poll_wait(file, &poll->waitq, wait);
719 switch (poll->event) {
737 struct vcs_poll_data *poll = file->private_data;
739 if (!poll) {
743 poll = vcs_poll_data_get(file);
744 if (!poll)
748 return fasync_helper(fd, file, on, &poll->fasync);
772 struct vcs_poll_data *poll = file->private_data;
774 if (poll)
775 vcs_poll_data_free(poll);
783 .poll = vcs_poll,