-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
libc/semaphore: Read semaphore value by using NXSEM_COUNT macro #16149
Conversation
@nuttxpr test avaota-a1:nsh |
[Experimental Bot, please feedback here] Build and Test Successful (avaota-a1:nsh)
|
@nuttxpr test milkv_duos:nsh |
[Experimental Bot, please feedback here] Build and Test Successful (milkv_duos:nsh)
|
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.
Tested OK with OSTest on Avaota-A1 A527 Arm64 SBC and Oz64 SG2000 64-bit RISC-V SBC. Thanks :-)
We should not access semaphore internals directly outside sched/semaphore. Just read it via the NXSEM_COUNT macro provided. Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
503534e
to
27d09ac
Compare
Summary
This is a small cleanup for libc nxsem_get_value, to use the provided macro to fetch the semaphore value instead of accessing semaphore internals directly outside of sched/semaphore.
Impact
No functional impact
Testing
This has obviously no functional impact, however, it has been tested together with all the changes in PR #16148 (in qemu and in real hardware).