[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Implementing poll(2) for Mini-OS?



Wei Liu, le Mon 18 Feb 2013 15:40:56 +0000, a écrit :
> +    ret = select(&rfds, &wfds, NULL, &_timeo);
> +
> +    for (i = 0; i < nfds; i++) {
> +        fd = pfd[i].fd;

Here we have to set revents to 0 before adding some bits. The caller may
not have cleared revents already.

> +     if (FD_ISSET(fd, &rfds))
> +            pfd[i].revents |= POLLIN;
> +     if (FD_ISSET(fd, &wfds))
> +            pfd[i].revents |= POLLOUT;
> +    }

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.