-
Notifications
You must be signed in to change notification settings - Fork 322
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
56e120f
to
7498993
Compare
mhennerich
approved these changes
Dec 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove obsolete options, change the --debug option to control the log level, and refactor IIOD to support compiling it without the network frontend.