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

Frediano Ziglio fziglio at redhat.com
Tue Jan 19 03:54:47 PST 2016


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.

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

-- 
2.4.3



More information about the Spice-devel mailing list