qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/11] poller: add Poller for growable GPollFD a


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 02/11] poller: add Poller for growable GPollFD arrays
Date: Thu, 31 Jan 2013 16:58:11 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 31, 2013 at 06:56:56AM -0600, Anthony Liguori wrote:
> Stefan Hajnoczi <address@hidden> writes:
> 
> > QEMU currently uses select(2)-style rfds/wfds/xfds for file descriptor
> > event polling.  Unfortunately the underlying fd_set type and its macros
> > (FD_SET()) have a hardcoded maximum for file descriptors.  It is
> > possible to exceed this limit so we need a more scalable event polling
> > structure.
> >
> > Poller is a growable array of GPollFDs that will allow us to use
> > g_poll(3) instead of select(2) in the future.
> >
> > Signed-off-by: Stefan Hajnoczi <address@hidden>
> 
> How about using a GArray instead?

g_poll(3) needs a contiguous array of GPollFD structs.  I can't see how
GArray can provide that - it seems to only work if you're using
g_array_*() accessor functions and doesn't give you a contiguous C
array.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]