-
Notifications
You must be signed in to change notification settings - Fork 7.4k
socketpair improvements #54458
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
socketpair improvements #54458
Conversation
545a1df
to
afeeced
Compare
I would really prefer to get this sample running in Pushing that off to a later date though. |
f5a9b6e
to
ebb5e58
Compare
ebb5e58
to
12ddcb7
Compare
@cfriedt |
Is there a reason why we apply this workaround: #ifdef CONFIG_ARCH_POSIX
#include <fcntl.h>
#else
#include <zephyr/posix/fcntl.h>
#endif to all files, but not in the |
Yes, the eventual goal would be to include Specifically w.r.t. the network subsystem though, due to At the moment there is a cyclic dependency between net and posix that needs to be broken by a mutual one. I.e. Currently, we have:
But we need
I'm thinking the correct name for Diagrams made with https://asciiflow.com/ [1] That assumes we don not want |
12ddcb7
to
96ce8c3
Compare
96ce8c3
to
8ce7cd2
Compare
* use `read()` instead of `recv()` * use `write()` instead of `send()` * use `CONFIG_POSIX_API` and drop `<zephyr/posix/..>` prefix * use `perror()` * fix `Makefile.posix` to use `CC` instead of `CXX` * fix race condition which caused an unhandled EOF and infinite loop, by adding a readback / echo * Updated the docs to reflect the expected stdout * Improve doc clarity Signed-off-by: Chris Friedt <[email protected]>
The source file for most single-file sample apps is usually `main.c`. Rename this file to be consistent with other samples. Signed-off-by: Chris Friedt <[email protected]>
* include `<zephyr/posix/fcntl.h>` instead of `<fcntl.h>` * drop unused logging header and module declaration * reorder headers alphabetically Signed-off-by: Chris Friedt <[email protected]>
If we are using `CONFIG_ARCH_POSIX`, then include `<fcntl.h>`. Otherwise, include `<zephyr/posix/fcntl.h>` since there are no requirements to use `CONFIG_POSIX_API` internally. Signed-off-by: Chris Friedt <[email protected]>
8ce7cd2
to
eda4e4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
4 commits:
socketpair_example.c
tomain.c
socketpair.c
<fcntl.h>
corrections in the networking subsystemFixes #54347
Fixes #52360