Re: [Qemu-devel] [RFC PATCH v5 01/14] util: introduce gsource event abstraction

2013-04-29 Thread Stefan Hajnoczi
On Sat, Apr 27, 2013 at 10:11:40AM +0800, liu ping fan wrote: > On Fri, Apr 26, 2013 at 5:19 PM, Stefan Hajnoczi wrote: > > On Fri, Apr 26, 2013 at 10:47:22AM +0800, Liu Ping Fan wrote: > >> +GPollFD *events_source_add_gfd(EventsGSource *src, int fd) > >> +{ > >> +GPollFD *retfd; > >> + > >> +

Re: [Qemu-devel] [RFC PATCH v5 01/14] util: introduce gsource event abstraction

2013-04-26 Thread liu ping fan
On Fri, Apr 26, 2013 at 5:19 PM, Stefan Hajnoczi wrote: > On Fri, Apr 26, 2013 at 10:47:22AM +0800, Liu Ping Fan wrote: >> +GPollFD *events_source_add_gfd(EventsGSource *src, int fd) >> +{ >> +GPollFD *retfd; >> + >> +retfd = g_slice_alloc(sizeof(GPollFD)); >> +retfd->events = 0; >> +

Re: [Qemu-devel] [RFC PATCH v5 01/14] util: introduce gsource event abstraction

2013-04-26 Thread Stefan Hajnoczi
On Fri, Apr 26, 2013 at 10:47:22AM +0800, Liu Ping Fan wrote: > +GPollFD *events_source_add_gfd(EventsGSource *src, int fd) > +{ > +GPollFD *retfd; > + > +retfd = g_slice_alloc(sizeof(GPollFD)); > +retfd->events = 0; > +retfd->fd = fd; > +src->pollfds_list = g_list_append(src->p

[Qemu-devel] [RFC PATCH v5 01/14] util: introduce gsource event abstraction

2013-04-25 Thread Liu Ping Fan
From: Liu Ping Fan Introduce two structs EventGSource, EventsGSource EventGSource is used to abstract the event with single backend file. EventsGSource is used to abstract the event with dynamically changed backend file, ex, slirp. Signed-off-by: Liu Ping Fan --- util/Makefile.objs |1 +