Repository navigation
!boards/boardctl: Remove BOARDIOC_SPINLOCK. - #21696
Merged
Merged
Conversation
pthread_spin_*() no longer use the BOARDIOC_SPINLOCK boardctl() command, and nothing else in nuttx or nuttx-apps uses it. Remove the command, CONFIG_BOARDCTL_SPINLOCK and struct boardioc_spinlock_s. The value 0x000f stays unused, so the other commands keep their numbers. Remove the documentation page of the boardioc_spinlock example too: the example is not in nuttx-apps. BREAKING CHANGE: the BOARDIOC_SPINLOCK boardctl() command and CONFIG_BOARDCTL_SPINLOCK are removed. Quick fix: an application uses pthread_spin_lock(), pthread_spin_trylock() and pthread_spin_unlock() (CONFIG_PTHREAD_SPINLOCKS); kernel code uses spin_lock() and spin_unlock() from <nuttx/spinlock.h>. A defconfig drops CONFIG_BOARDCTL_SPINLOCK. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]>
xiaoxiang781216
approved these changes
Nov 11, 2026
Contributor
Author
|
@xiaoxiang781216 should we keep this a breaking change and send dev@ email? User code should not use this anyway, so I guess we can skip dev@ email. what do you think? |
Contributor
yes, I think so. |
|
xiaoxiang781216
marked this pull request as ready for review
November 13, 2026 06:41
xiaoxiang781216
requested review from
acassis,
jerpelea and
raiden00pl
as code owners
November 13, 2026 06:41
casaroli
marked this pull request as draft
November 14, 2026 07:33
casaroli
marked this pull request as ready for review
November 14, 2026 07:33
acassis
approved these changes
Nov 14, 2026
This file contains hidden or 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
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.
Summary
After #21693,
pthread_spin_*()no longer use theBOARDIOC_SPINLOCKboardctl() command, and nothing else in nuttx or nuttx-apps uses it. This PR removes the command,CONFIG_BOARDCTL_SPINLOCKandstruct boardioc_spinlock_s. The value0x000fstays unused, so the other commands keep their numbers.It also removes the documentation page of the
boardioc_spinlockexample: the example is not in nuttx-apps.BREAKING CHANGE
The
BOARDIOC_SPINLOCKboardctl() command andCONFIG_BOARDCTL_SPINLOCKare removed.Quick fix: an application that called
boardctl(BOARDIOC_SPINLOCK)usespthread_spin_lock(),pthread_spin_trylock()andpthread_spin_unlock()(CONFIG_PTHREAD_SPINLOCKS); kernel code usesspin_lock()andspin_unlock()from<nuttx/spinlock.h>. A defconfig dropsCONFIG_BOARDCTL_SPINLOCK.Impact
boards/boardctl.c,include/sys/boardctl.h,boards/Kconfig, the example page andlibs/libc/pthread/pthread_spinlock.cnameBOARDIOC_SPINLOCKorCONFIG_BOARDCTL_SPINLOCK; libs/libc/pthread: Implement spin locks with atomics. #21693 removes the use inpthread_spinlock.cand theselectinlibs/libc/pthread/Kconfig. No defconfig setsCONFIG_BOARDCTL_SPINLOCK.Testing
EXTRAFLAGS=-Werror:qemu-armv8a:knsh+CONFIG_PTHREAD_SPINLOCKS(0 warnings) andbl602evb:wifi: OK.tools/checkpatch.sh -c -u -m -g -bon the commit passes.