This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 474b3f403c95b822e3f22e8772aaf8f70a332a82 Author: ganjing <[email protected]> AuthorDate: Wed Dec 24 17:58:27 2025 +0800 libc/spawn: Update the policy range check for the new SCHED_* values. The previous commit renumbered the scheduling policies from SCHED_FIFO (0) to SCHED_OTHER (3). Update the range of the assertion in posix_spawnattr_setschedpolicy(), which still checked SCHED_OTHER to SCHED_SPORADIC. Assisted-by: Kiro:auto Signed-off-by: ganjing <[email protected]> --- libs/libc/spawn/lib_psa_setschedpolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/spawn/lib_psa_setschedpolicy.c b/libs/libc/spawn/lib_psa_setschedpolicy.c index 7278fc08630..d9f998bb798 100644 --- a/libs/libc/spawn/lib_psa_setschedpolicy.c +++ b/libs/libc/spawn/lib_psa_setschedpolicy.c @@ -53,7 +53,7 @@ int posix_spawnattr_setschedpolicy(FAR posix_spawnattr_t *attr, int policy) { - DEBUGASSERT(attr && (policy >= SCHED_OTHER && policy <= SCHED_SPORADIC)); + DEBUGASSERT(attr && (policy >= SCHED_FIFO && policy <= SCHED_OTHER)); attr->policy = (uint8_t)policy; return OK; }
