Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIOD: Support compiling without the network frontend #1101

Merged
merged 9 commits into from
Dec 19, 2023

Conversation

pcercuei
Copy link
Contributor

Remove obsolete options, change the --debug option to control the log level, and refactor IIOD to support compiling it without the network frontend.

Add a thread_pool_wait() function which will wait until all the threads
in the pool are done.

Signed-off-by: Paul Cercueil <[email protected]>
This was useful in the infancy of the project, but it is much less
useful now, especially since Libiio switched to a datagram based
protocol.

Signed-off-by: Paul Cercueil <[email protected]>
The option to run IIOD with the incompatible "debug" protocol does not
really make sense now that Libiio switched to a datagram-based protocol.

Note that we don't remove the --debug option, just make it ineffective -
it will be reused later.

Signed-off-by: Paul Cercueil <[email protected]>
When --debug is used, IIOD will now output the debug logs to the
standard output.

Signed-off-by: Paul Cercueil <[email protected]>
This option was unconditionally enabled on the USB frontend, and
unconditionally disabled on the network frontend, independently on
whether or not --aio was specified.

Since it works perfectly fine on USB, enable it everywhere as long as it
has been enabled in the config.

Signed-off-by: Paul Cercueil <[email protected]>
Use IIO_PERROR() instead of manually calling iio_strerror() +
IIO_ERROR().

Signed-off-by: Paul Cercueil <[email protected]>
Move all the network code to a new network.c. The code is slightly
different, as the network code now runs into its own thread, attached to
the main thread pool, and the client threads it will create will be
attached to a new pool.

This will later allow to disable network support at compile time.

Signed-off-by: Paul Cercueil <[email protected]>
The main thread will then create the network server only when enabled in
the config.

Signed-off-by: Paul Cercueil <[email protected]>
If the network support has been disabled, we must have extra parameters
to be able to use either the USB frontend, or the UART frontend. If no
extra parameters corresponding to those frontends are passed, exit with
an error message.

Signed-off-by: Paul Cercueil <[email protected]>
@pcercuei pcercuei force-pushed the pcercuei/iiod-no-network branch from 56e120f to 7498993 Compare December 11, 2023 16:18
@pcercuei pcercuei merged commit 1a3a6e1 into main Dec 19, 2023
23 of 24 checks passed
@pcercuei pcercuei deleted the pcercuei/iiod-no-network branch December 19, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants