-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
semaphore: change semaphore count to atomic operation #15075
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
[Experimental Bot, please feedback here] No. The PR description lacks several key details required by the NuttX guidelines. Here's a breakdown:
In short: The PR needs to be significantly expanded to address these missing details before it can be considered complete according to the NuttX requirements. Focus on providing specific, detailed answers to all questions in the template. |
22e0542
to
4b89636
Compare
bd9ba91
to
fd34884
Compare
define nx_atomic_compare_exchange_weak and nx_atomic_compare_exchange_strong function Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
Add sem_wait fast operations, use atomic to ensure atomicity of semcount operations, and do not depend on critical section. Test with robot: before modify: nxmutex_lock cost: 78 ns nxmutex_unlock cost: 82 ns after modify: nxmutex_lock cost: 28 ns nxmutex_unlock cost: 14 ns Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
mqueue sysv not used, remove to reduce sram usage Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
After SEM_VALUE_MAX change to INT_MAX, need to support skip result. Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
0656fa4
to
2887e90
Compare
xiaoxiang781216
approved these changes
Dec 10, 2024
1 task
tmedicci
added a commit
to tmedicci/nuttx
that referenced
this pull request
Dec 11, 2024
After apache#15075, the static assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c` was being triggered when building any of the ESP32-S3's defconfigs. This commit updates the reserved size to reflect the changes introduced by the related PR.
xiaoxiang781216
pushed a commit
that referenced
this pull request
Dec 11, 2024
After #15075, the static assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c` was being triggered when building any of the ESP32-S3's defconfigs. This commit updates the reserved size to reflect the changes introduced by the related PR.
jerpelea
pushed a commit
to jerpelea/nuttx
that referenced
this pull request
Dec 12, 2024
After apache#15075, the static assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c` was being triggered when building any of the ESP32-S3's defconfigs. This commit updates the reserved size to reflect the changes introduced by the related PR.
xiaoxiang781216
pushed a commit
that referenced
this pull request
Dec 12, 2024
After #15075, the static assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c` was being triggered when building any of the ESP32-S3's defconfigs. This commit updates the reserved size to reflect the changes introduced by the related PR.
1 task
tmedicci
added a commit
to tmedicci/nuttx
that referenced
this pull request
Dec 12, 2024
After apache#15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 3072 to avoid stack overflow.
tmedicci
added a commit
to tmedicci/nuttx
that referenced
this pull request
Dec 12, 2024
After apache#15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 4096 to avoid stack overflow.
xiaoxiang781216
pushed a commit
that referenced
this pull request
Dec 12, 2024
After #15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 3072 to avoid stack overflow.
jerpelea
pushed a commit
to jerpelea/nuttx
that referenced
this pull request
Dec 13, 2024
After apache#15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 3072 to avoid stack overflow.
xiaoxiang781216
pushed a commit
that referenced
this pull request
Dec 13, 2024
After #15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 3072 to avoid stack overflow.
linguini1
pushed a commit
to CarletonURocketry/nuttx
that referenced
this pull request
Jan 15, 2025
After apache#15075, the static assertion at `nuttx/arch/xtensa/src/esp32s3/esp32s3_libc_stubs.c` was being triggered when building any of the ESP32-S3's defconfigs. This commit updates the reserved size to reflect the changes introduced by the related PR.
linguini1
pushed a commit
to CarletonURocketry/nuttx
that referenced
this pull request
Jan 15, 2025
After apache#15075, the size of the stack size has decreased 8 bytes and the init stack size for the rv-virt:citest defconfig was near its full capacity, which lead to crashing the `ps` command. The init stack size for this defconfig was increased from 2048 to 3072 to avoid stack overflow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: CI
Area: OS Components
OS Components issues
Area: Tooling
Board: arm
Size: M
The size of the change in this PR is medium
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.
Summary
Add sem_wait fast operations, use atomic to ensure atomicity of semcount operations, and do not depend on critical section.
Test with robot board:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns
after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns
Impact
semaphore
Testing
bes board with monkey test pass
sabre-6quad:smp with ostest pass
sim:citest pass