Add infrastructure for using multiple event loops

This change adds two configuration options:

  --with-eventloop=[glib|internal|auto]
  --with-pollmethod=[epoll|auto]

First allows switching between GLib event loop and internal one.
Second chooses backend to use for internal event loop.
Conditional compilation symbols are changed accordingly.
Additional helper macro MPD_OPTIONAL_FUNC_NODEF is added as well.
This commit is contained in:
Denis Krjuchkov
2013-11-27 17:04:38 +06:00
parent 22fb49fa90
commit 46bab7e4b9
15 changed files with 295 additions and 114 deletions
+4 -2
View File
@@ -25,7 +25,7 @@
#include <assert.h>
#ifdef USE_EPOLL
#ifdef USE_INTERNAL_EVENTLOOP
MultiSocketMonitor::MultiSocketMonitor(EventLoop &_loop)
:IdleMonitor(_loop), TimeoutMonitor(_loop), ready(false) {
@@ -65,7 +65,9 @@ MultiSocketMonitor::OnIdle()
}
}
#else
#endif
#ifdef USE_GLIB_EVENTLOOP
/**
* The vtable for our GSource implementation. Unfortunately, we