From: Ian Jackson Subject: Re: [PATCH 02/20] libxl: support multiple libxl__ev_fds for the same fd Date: Mon, 16 Apr 2012 11:26:20 +0100 Message-ID: <20363.62412.202259.832878@mariner.uk.xensource.com> References: <1334342414-10289-1-git-send-email-ian.jackson@eu.citrix.com> <1334342414-10289-3-git-send-email-ian.jackson@eu.citrix.com> <1334563449.4445.24.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334563449.4445.24.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH 02/20] libxl: support multiple libxl__ev_fds for the same fd"): > On Fri, 2012-04-13 at 19:39 +0100, Ian Jackson wrote: > > We need a slightly more sophisticated data structure to allow this, > > where we record the slot not just for each fd but also for each > > (fd,eventbit) where eventbit is POLLIN, POLLPRI, POLLOUT. > > Just to be sure I'm following: By multiple you mean you can have one > libxl__ev_fds listening for e.g. POLLIN and another for POLLOUT but you > specifically exclude the case where two libxl__ev_fds both want to > listen for POLLIN? Similarly one listening for POLLIN|POLLPRI and the > other for POLLOUT|POLLPRI (overlapping) is forbidden. Yes, exactly. As I say in the new doc comment: + * + * It is not permitted to listen for the same or overlapping events + * on the same fd using multiple different libxl__ev_fd's. This restriction is actually stronger than that required by the code. The code merely requires that for every distinct libxl__ev_fd listening on the same fd, it has at least one of the three flags all to itself. So your second scenario would actually work. Would it be worth documenting this precise restriction ? > > + * fd_rindices, and each elemebnt in the rindices is three indices > > element Fixed. > So, other than the typoe: > > Acked-by: Ian Campbell Thanks. Ian.