This patch addresses a need to be able to use common mainloop for the ell-based apps that desire to use common bluetooth fuctionality (e.g., bt_shell). A bit awkward callback handling there is due to the discrepancy in the arg type for signo (signal number) in: typedef void (*mainloop_signal_func) (int signum, void *user_data) and typedef void (*l_main_signal_cb_t) (uint32_t signo, void *user_data) My guess is that ell derives the unsigned int type from <sys/signalfd.h>, where ssi_signo is defined as uint32_t. Bluez is probably following the standard Linux signal handling, where signal is represented as an int. Inga Stotland (1): shared/mainloop: Add ell-based mainloop implementation Makefile.am | 13 +++- src/shared/mainloop-ell.c | 129 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 src/shared/mainloop-ell.c -- 2.21.0