On Tue, 11/25 13:38, Stefan Hajnoczi wrote:
> On Tue, Nov 25, 2014 at 04:07:57PM +0800, Fam Zheng wrote:
> > +QEMUPoll *qemu_poll_new(void)
> > +{
> > +int epollfd;
> > +QEMUPoll *qpoll = g_new0(QEMUPoll, 1);
> > +epollfd = epoll_create1(EPOLL_CLOEXEC);
> > +if (epollfd < 0) {
> > +
On Tue, Nov 25, 2014 at 04:07:57PM +0800, Fam Zheng wrote:
> +QEMUPoll *qemu_poll_new(void)
> +{
> +int epollfd;
> +QEMUPoll *qpoll = g_new0(QEMUPoll, 1);
> +epollfd = epoll_create1(EPOLL_CLOEXEC);
> +if (epollfd < 0) {
> +perror("epoll_create1:");
> +abort();
> +
This implements qemu_poll with epoll. The only complex part is
qemu_poll_set_fds, which will sync up epollfd with epoll_ctl by
computing the symmetric difference of previous and new fds.
Signed-off-by: Fam Zheng
---
Makefile.objs | 4 +-
poll-linux.c | 216