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