-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
samples: doc: Added README for POSIX samples #67461
samples: doc: Added README for POSIX samples #67461
Conversation
Hello @dougwfoster, and thank you very much for your first pull request to the Zephyr project! |
e07e060
to
70b4ab3
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 - a great follow up commit or PR would be to list POSIX samples in the os services / portability / POSIX doc area.
Would be happy to re-approve if you wish to add that here, @dougwfoster ?
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.
Thanks!
Additional note: line wrapping is a bit inconsistent in the two proposed files. I realize this might be due to copy-pasting from the other POSIX sample README, but it would make sense to adjust to have consistent 100-character long lines.
:board: qemu_x86 | ||
:goals: run | ||
:compact: | ||
|
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.
do you want to add the "For comparison, to build directly for your host OS if it is POSIX compliant (for ex. Linux):" ... thing here too? It's actually quite a nice thing to mention.
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.
I noticed the uname sample does not have a Makefile.host file. I tried adding one but ran into build errors due to the include files of the sample. I decided not to add a Makefile.host for the uname sample
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.
@dougwfoster this now can be done since #67648 is merged
samples/posix/eventfd/README.rst
Outdated
Overview | ||
******** | ||
|
||
This sample application demonstrates using the POSIX eventfd() |
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.
adding a reference to eventfd() doc would be welcome here, but not sure why there's none on opengroup webpage? @cfriedt might know
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.
eventfd()
is not yet part of POSIX. It just happens to be lumped in with POSIX in Zephyr because it's available on most POSIX systems, is mostly dependent & compatible already on existing POSIX APIs, etc.
I'm ok taking eventfd()
under the POSIX API wing in Zephyr, in any case.
That's a good idea. I can add a POSIX Sample section there or list them in the POSIX Applications in Zephyr section. |
@dougwfoster - I think the samples portion should probably be automatically built (as long as the .rst files are captured by the main sample rst) From the os services / portability / POSIX page, maybe just a link back to the samples would be good? @kartben could probably be more specific. |
70b4ab3
to
4a4aaf5
Compare
samples/posix/eventfd/README.rst
Outdated
make -f samples/posix/eventfd/Makefile.host | ||
|
||
The make output file will be located in samples/posix/eventfd. |
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.
non blocking: kind of not ideal that this adds a new untracked file to the git repo, but I guess it was already like that before.
cff749f
to
bff4085
Compare
Added README.rst for eventfd and uname samples. Updated README for gettimeofday to align with other READMEs.Updated Makefile.host file for samples to store output file in 'build' directory. Signed-off-by: Doug Foster <[email protected]>
Update index.rst located in doc/services/portability/posix/overview to include link to POSIX samples. Signed-off-by: Doug Foster <[email protected]>
bff4085
to
be01b88
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 - the only slight inaccuracy is that events is not POSIX (yet), even though it is available on many POSIX operating systems.
Otherwise, I think maybe @kartben could potentially offer some style suggestions?
Hi @dougwfoster! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Added README.rst for eventfd and uname POSIX samples.
Helps fix #27805