mirror of
https://github.com/apache/nuttx.git
synced 2026-09-29 18:45:22 +00:00
Sporadic scheduling parameters are processed independently by sched_setparam(), sched_setscheduler(), and pthread_create(). The three paths currently validate different subsets of the parameters. In particular, pthread_create() does not validate sched_ss_max_repl and only requires the replenishment period to be greater than the budget, while the scheduler interfaces enforce the implementation's 50 percent duty-cycle limit. Add nxsched_validate_sporadic() to validate the common parameters and convert the replenishment period and budget to ticks. Use it from all paths that directly initialize or update sporadic scheduler state. Express the duty-cycle check using division to avoid overflow when doubling a clock_t value. Assisted-by: OpenAI Codex Signed-off-by: yushuailong <yyyusl@qq.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Make.defs | ||
| pthread.h | ||
| pthread_cancel.c | ||
| pthread_completejoin.c | ||
| pthread_create.c | ||
| pthread_detach.c | ||
| pthread_exit.c | ||
| pthread_findjoininfo.c | ||
| pthread_getaffinity.c | ||
| pthread_getschedparam.c | ||
| pthread_join.c | ||
| pthread_release.c | ||
| pthread_setaffinity.c | ||
| pthread_setschedparam.c | ||
| pthread_setschedprio.c | ||
| pthread_sigmask.c | ||