ELL based mainloop
Subsystems (2)
v3 cover ELL based mainloop
+ timeout-ell.c
This patch addresses a need to enable using common mainloop for the ell-based apps that desire to use common bluetooth fuctionality (e.g., bt_shell).
Note: A bit awkward callback handling there is due to the discrepancy in the arg type for signo (signal number).
src/shared/mainloop.h:
typedef void (*mainloop_signal_func) (int signum, void *user_data)
and ell/main.h:
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 | 11 +++- src/shared/mainloop-ell.c | 126 ++++++++++++++++++++++++++++++++++++++ src/shared/timeout-ell.c | 72 ++++++++++++++++++++++ 3 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 src/shared/mainloop-ell.c create mode 100644 src/shared/timeout-ell.c
Signature · 1 line
2.21.0
PATCH v3 1/1 shared/mainloop: Add ell-based mainloop implementation
This adds implementation of wrapper mainloop functions to interact with ell main APIs, enabling support for the applications that link with ell library and use mainloop functionality.
--- Makefile.am | 11 +++- src/shared/mainloop-ell.c | 126 ++++++++++++++++++++++++++++++++++++++ src/shared/timeout-ell.c | 72 ++++++++++++++++++++++ 3 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 src/shared/mainloop-ell.c create mode 100644 src/shared/timeout-ell.c
Makefile.am +8 -3
@@ -162,6 +162,10 @@ CLEANFILES += $(ell_built_sources) noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la +if LIBSHARED_ELL +noinst_LTLIBRARIES += src/libshared-ell.la +endif + shared_sources = src/shared/io.h src/shared/timeout.h \ src/shared/queue.h src/shared/queue.c \ src/shared/util.h src/shared/util.c \
@@ -206,10 +210,11 @@ src_libshared_mainloop_la_SOURCES = $(shared_sources) \ src/shared/mainloop-notify.c if LIBSHARED_ELL -noinst_LTLIBRARIES += src/libshared-ell.la - src_libshared_ell_la_SOURCES = $(shared_sources) \ - src/shared/io-ell.c + src/shared/io-ell.c \ + src/shared/timeout-ell.c \ + src/shared/mainloop.h \ + src/shared/mainloop-ell.c endif attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
src/shared/mainloop-ell.c new file +126 -0
126 lines not on this page · raw message
src/shared/timeout-ell.c new file +72 -0
72 lines not on this page · raw message
Signature · 1 line
2.21.0
Ping
Quoted 34 lines · Inga Stotland
+
timeout-ell.cThis patch addresses a need to enable using common mainloop for the ell-based apps that desire to use common bluetooth fuctionality (e.g.,
bt_shell).Note: A bit awkward callback handling there is due to the discrepancy in the arg type for signo (signal number).
src/shared/mainloop.h:
typedef void (*mainloop_signal_func) (int signum, void*user_data)and
ell/main.h:typedef void (
*l_main_signal_cb_t) (uint32_tsigno, void*user_data)My guess is that ell derives the unsigned int type from <
sys/signalfd.h>,
wheressi_signois defined asuint32_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 implementationMakefile.am | 11 +++- src/shared/mainloop-ell.c | 126 ++++++++++++++++++++++++++++++++++++++ src/shared/timeout-ell.c | 72 ++++++++++++++++++++++ 3 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 src/shared/mainloop-ell.c create mode 100644 src/shared/timeout-ell.c
Hi Inga,
Quoted 38 lines · Inga
Ping
Quoted 34 lines · Inga Stotland
+
timeout-ell.cThis patch addresses a need to enable using common mainloop for the ell-based apps that desire to use common bluetooth fuctionality (e.g.,
bt_shell).Note: A bit awkward callback handling there is due to the discrepancy in the arg type for signo (signal number).
src/shared/mainloop.h:
typedef void (*mainloop_signal_func) (int signum, void*user_data)and
ell/main.h:typedef void (
*l_main_signal_cb_t) (uint32_tsigno, void*user_data)My guess is that ell derives the unsigned int type from <
sys/signalfd.h>,
wheressi_signois defined asuint32_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 implementationMakefile.am | 11 +++- src/shared/mainloop-ell.c | 126 ++++++++++++++++++++++++++++++++++++++ src/shared/timeout-ell.c | 72 ++++++++++++++++++++++ 3 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 src/shared/mainloop-ell.c create mode 100644 src/shared/timeout-ell.c
Applied, thanks.
Signature · 1 line
Luiz Augusto von Dentz