Shanks0224 opened a new pull request, #21834: URL: https://github.com/apache/nuttx/pull/21834
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary This series fixes behavior that the PSE52 profile (IEEE 1003.13) requires and that its test suite checks: the PSE52 thread options in `<unistd.h>` and `sysconf()`, thread cancellation, thread-specific data keys, circular `pthread_join()`, scheduling policies and the `PTHREAD_PRIO_PROTECT` unlock, EINVAL for invalid pthread objects, and the wait count of condition variables. Each commit message describes its change. The commits are submitted together because they are one conformance change: the validity checks need the new constant values, and the condition variable fixes build on each other. Depends-On: https://github.com/apache/nuttx-apps/pull/4049 ## Impact BREAKING CHANGE: two commits change the values of public constants: * `SCHED_FIFO`, `SCHED_RR`, `SCHED_SPORADIC`, `SCHED_OTHER` and `SCHED_NORMAL` (commit "sched: Make the SCHED_* values match the TCB policy bits."). * `PTHREAD_PROCESS_PRIVATE`, `PTHREAD_PROCESS_SHARED` and the `CLOCK_*` IDs (commit "libc/pthread: Return EINVAL for invalid pthread objects."). Code that uses the symbolic names only needs to be rebuilt. Code that takes numeric values from the user must map them to the names; the nuttx-apps PR above does this for the `-c` option of cyclictest. `pthread_cond_destroy()` now returns EBUSY while threads wait on the condition; the nuttx-apps PR updates the ostest cancel test for it. Size, `b-l475e-iot01a:nsh`: text 121231 -> 121295 bytes (+64). ## Testing ostest passes before and after the change on a B-L475E-IOT01A board (`b-l475e-iot01a:nsh` with `CONFIG_TESTING_OSTEST=y`), and with the change in these builds: * flat: `sim:ostest` (Make and CMake builds), 5 loops. * protected: `qemu-armv7r:pnsh` with `CONFIG_TESTING_OSTEST=y`, QEMU 10.2.1. * kernel: `qemu-armv7a:knsh` with `CONFIG_TESTING_OSTEST=y`. B-L475E-IOT01A, with the change: ``` nsh> uname -a NuttX 13.1.1-RC0 4420b1cb38 Nov 13 2026 16:56:40 arm b-l475e-iot01a nsh> ostest stdio_test: write fd=1 ... user_main: Exiting ostest_main: Exiting with status 0 ``` No new regression test is added: the changes fix failures that the PSE52 test suite found, and that suite is not part of nuttx-apps. Not tested: RISC-V, AArch64 and other architectures, SMP, and `CONFIG_SCHED_SPORADIC`. -- 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]
