System: More work on making system functions pluggable

Move the epoll functions to the system functions and make the loop
use those. Use simple mask for events instead of enum.
Add the used system api in pw_loop.
Add System API to spa_support and use it where possible.
Pass the system API used in the realtime loops in spa_support as
well and use this in the realtime paths.
Improve bootstrapping, load only the log and cpu interfaces because
those can/need to be shared between instances. Let the core load
the other interfaces.
Add keys to configure the System and Loop implementations used in
pw_loop.
This commit is contained in:
Wim Taymans 2019-06-06 15:21:40 +02:00
parent 86dc0496a5
commit db88e9f954
22 changed files with 455 additions and 342 deletions

View file

@ -76,9 +76,9 @@ static void dispatch_status(DBusConnection *conn, DBusDispatchStatus status, voi
status == DBUS_DISPATCH_COMPLETE ? false : true);
}
static inline enum spa_io dbus_to_io(DBusWatch *watch)
static inline uint32_t dbus_to_io(DBusWatch *watch)
{
enum spa_io mask;
uint32_t mask;
unsigned int flags;
/* no watch flags for disabled watches */
@ -96,7 +96,7 @@ static inline enum spa_io dbus_to_io(DBusWatch *watch)
return mask;
}
static inline unsigned int io_to_dbus(enum spa_io mask)
static inline unsigned int io_to_dbus(uint32_t mask)
{
unsigned int flags = 0;
@ -112,7 +112,7 @@ static inline unsigned int io_to_dbus(enum spa_io mask)
}
static void
handle_io_event(void *userdata, int fd, enum spa_io mask)
handle_io_event(void *userdata, int fd, uint32_t mask)
{
DBusWatch *watch = userdata;