[Spice-devel] [PATCH v4 0/5] Event loop improves

Frediano Ziglio fziglio at redhat.com
Wed Jan 20 08:28:34 PST 2016


> 
> On Tue, 2016-01-19 at 11:54 +0000, Frediano Ziglio wrote:
> > These set of patches try to improve current event loop code.
> > 
> > Patches improve test event loop, make a template from
> > them and use for main loop.
> > These patches also improve glib main loop patch from Marc and
> > supercede fixes for timers reducing original patch size and making
> > easier to test code.
> > 
> > Changes from v3:
> > - reintroduced template file. This is necessary after libserver library.
> >   The reason is that the module file was using some function exported
> >   by red-worker.c (and so libserver) while the same module is used by
> >   libtest, included by all tests so using libtest and libserver was
> >   not possible;
> > - extend test to check if deleting active timers works correctly
> >   not calling them.
> 
> So, just so I understand the context: are you fairly comfortable merging the
> glib loop stuff to master now that you've fixed that use-after-free issue
> that
> you thought was related to the glib loop changes?
> 
> 

This is a good question.
When I posted the patch series I though was not still the time.
When I read this reply I though  "Which patch?" really, this patch has seen
so many changes that I had multiple ones on my branches!
After I merges the most of the patch on this series I sort out and remove
stuff implemented already and manage to get a clean one (the one now in refactory
branch). Actually there are two patches (main one and a style one) beside some
hunks we decided to move into another one.
Looking now at the state of the patches there are much smaller but looks
like there is some small changes to do. I'll post them as a separate series.

Frediano

> 
> > 
> > Frediano Ziglio (5):
> >   tests: do not use default loop context
> >   tests: extract code for event loop
> >   tests: add a test for event loop
> >   tests: test removed triggered timers are not called
> >   worker: use glib main loop
> > 
> >  server/Makefile.am              |   3 +-
> >  server/event-loop.tmpl.c        | 190 ++++++++++++++++++++++++++++
> >  server/red-worker.c             | 252
> >  +++++++++++++++----------------------
> >  server/red-worker.h             |   1 +
> >  server/spice_timer_queue.c      | 267
> >  ---------------------------------------
> > -
> >  server/spice_timer_queue.h      |  44 -------
> >  server/tests/Makefile.am        |   2 +
> >  server/tests/basic_event_loop.c | 162 ++++++------------------
> >  server/tests/basic_event_loop.h |   3 +
> >  server/tests/replay.c           |  18 ++-
> >  server/tests/test-loop.c        | 155 +++++++++++++++++++++++
> >  11 files changed, 499 insertions(+), 598 deletions(-)
> >  create mode 100644 server/event-loop.tmpl.c
> >  delete mode 100644 server/spice_timer_queue.c
> >  delete mode 100644 server/spice_timer_queue.h
> >  create mode 100644 server/tests/test-loop.c
> > 
> 


More information about the Spice-devel mailing list