mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
|
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
When querying the calling task itself (pid == 0 or the caller's own pid), nxsched_get_param() only filled in sched_priority and never touched the SCHED_SPORADIC related members (sched_ss_low_priority, sched_ss_max_repl, sched_ss_repl_period and sched_ss_init_budget). With CONFIG_SCHED_SPORADIC enabled, the caller received uninitialized stack garbage in these fields, and a task running under the sporadic policy could not retrieve its own sporadic parameters. Fix this by factoring the sporadic parameter fill-in into a common helper nxsched_get_sporadic_param() shared by both the self-query and the lookup paths, so both paths now return identical information. The self-query path keeps its original fast-path behavior: no TCB lookup and a lock-free read of sched_priority. Only the read of the sporadic state is wrapped in a critical section, because tcb->sporadic may be freed concurrently, e.g. by sched_setscheduler() from another CPU switching the task away from SCHED_SPORADIC. Signed-off-by: yushuailong <yyyusl@qq.com> |
||
|---|---|---|
| .. | ||
| addrenv | ||
| clock | ||
| environ | ||
| event | ||
| group | ||
| hrtimer | ||
| init | ||
| instrument | ||
| irq | ||
| misc | ||
| module | ||
| mqueue | ||
| paging | ||
| pthread | ||
| sched | ||
| semaphore | ||
| signal | ||
| task | ||
| timer | ||
| tls | ||
| wdog | ||
| wqueue | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Makefile | ||