casaroli opened a new pull request, #21696:
URL: https://github.com/apache/nuttx/pull/21696

   depends-on: apache/nuttx/pull/21693
   
   ## Summary
   
   After apache/nuttx#21693, `pthread_spin_*()` no longer use the 
`BOARDIOC_SPINLOCK` boardctl() command, and nothing else in nuttx or nuttx-apps 
uses it. This PR removes the command, `CONFIG_BOARDCTL_SPINLOCK` and `struct 
boardioc_spinlock_s`. The value `0x000f` stays unused, so the other commands 
keep their numbers.
   
   It also removes the documentation page of the `boardioc_spinlock` example: 
the example is not in nuttx-apps.
   
   ## BREAKING CHANGE
   
   The `BOARDIOC_SPINLOCK` boardctl() command and `CONFIG_BOARDCTL_SPINLOCK` 
are removed.
   
   Quick fix: an application that called `boardctl(BOARDIOC_SPINLOCK)` 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`.
   
   ## Impact
   
   - In nuttx and nuttx-apps master, only `boards/boardctl.c`, 
`include/sys/boardctl.h`, `boards/Kconfig`, the example page and 
`libs/libc/pthread/pthread_spinlock.c` name `BOARDIOC_SPINLOCK` or 
`CONFIG_BOARDCTL_SPINLOCK`; apache/nuttx#21693 removes the use in 
`pthread_spinlock.c` and the `select` in `libs/libc/pthread/Kconfig`. No 
defconfig sets `CONFIG_BOARDCTL_SPINLOCK`.
   - Out-of-tree code that uses the command must change (quick fix above).
   
   ## Testing
   
   - With apache/nuttx#21693, `EXTRAFLAGS=-Werror`: `qemu-armv8a:knsh` + 
`CONFIG_PTHREAD_SPINLOCKS` (0 warnings) and `bl602evb:wifi`: OK.
   - The removed code has no caller, so nothing runs differently. The runtime 
tests of apache/nuttx#21693 (QEMU arm64 kernel, flat and SMP, rv64 kernel, 
armv7-m protected; RP2350 and ESP32-S3 boards) cover the same code.
   - `tools/checkpatch.sh -c -u -m -g -b` on the commit passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to